summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2018-03-22 13:00:33 -0400
committerRay Strode <rstrode@redhat.com>2018-03-28 16:43:51 -0400
commitdc072ed30bf27661d65ae1883bb3ed0a67e0a966 (patch)
tree97b9e78077186d1dec78902b7633950c7535bd4c
parentf1772c3783a8b37655a2e9aeee69e130413241a7 (diff)
downloadpolkit-dc072ed30bf27661d65ae1883bb3ed0a67e0a966.tar.gz
jsauthority: get rid of JSRuntime
Seems like JSContext is the only thing that matters now.
-rw-r--r--src/polkitbackend/polkitbackendjsauthority.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/polkitbackend/polkitbackendjsauthority.cpp b/src/polkitbackend/polkitbackendjsauthority.cpp
index 62e8228..235d613 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;
@@ -363,7 +362,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);
@@ -455,11 +454,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;
@@ -590,7 +585,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);