diff options
author | Ray Strode <rstrode@redhat.com> | 2018-03-22 13:00:33 -0400 |
---|---|---|
committer | Ray Strode <rstrode@redhat.com> | 2018-04-03 14:16:23 -0400 |
commit | d633aa5598151f04dcc9178a197cbf30aca0ada2 (patch) | |
tree | 11e187752f1bfc3150c770881195b89378d9b9fb | |
parent | 237f21f7a4274d305c5d9e001cf5f43ca101257c (diff) | |
download | polkit-d633aa5598151f04dcc9178a197cbf30aca0ada2.tar.gz |
jsauthority: get rid of JSRuntime
Seems like JSContext is the only thing that matters now.
Signed-off-by: Ray Strode <rstrode@redhat.com>
https://bugs.freedesktop.org/show_bug.cgi?id=105865
-rw-r--r-- | src/polkitbackend/polkitbackendjsauthority.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/polkitbackend/polkitbackendjsauthority.cpp b/src/polkitbackend/polkitbackendjsauthority.cpp index 3706470..7bcfda9 100644 --- a/src/polkitbackend/polkitbackendjsauthority.cpp +++ b/src/polkitbackend/polkitbackendjsauthority.cpp @@ -73,7 +73,6 @@ struct _PolkitBackendJsAuthorityPrivate gchar **rules_dirs; GFileMonitor **dir_monitors; /* NULL-terminated array of GFileMonitor instances */ - JSRuntime *rt; JSContext *cx; JSObject *js_global; JSAutoCompartment *ac; @@ -362,7 +361,7 @@ reload_scripts (PolkitBackendJsAuthority *authority) polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority), "Collecting garbage unconditionally..."); - JS_GC (authority->priv->rt); + JS_GC (authority->priv->cx); load_scripts (authority); @@ -454,11 +453,7 @@ polkit_backend_js_authority_constructed (GObject *object) PolkitBackendJsAuthority *authority = POLKIT_BACKEND_JS_AUTHORITY (object); gboolean entered_request = FALSE; - authority->priv->rt = JS_NewRuntime (8L * 1024L * 1024L, JS_USE_HELPER_THREADS); - if (authority->priv->rt == NULL) - goto fail; - - authority->priv->cx = JS_NewContext (authority->priv->rt, 8192); + authority->priv->cx = JS_NewContext (8L * 1024L * 1024L); if (authority->priv->cx == NULL) goto fail; @@ -579,7 +574,6 @@ polkit_backend_js_authority_finalize (GObject *object) JS_EndRequest (authority->priv->cx); JS_DestroyContext (authority->priv->cx); - JS_DestroyRuntime (authority->priv->rt); /* JS_ShutDown (); */ G_OBJECT_CLASS (polkit_backend_js_authority_parent_class)->finalize (object); |