From 473ebe9e4aa39d81525ae5e4fb3df8202f074b5b Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Thu, 22 Mar 2018 13:00:33 -0400 Subject: jsauthority: get rid of JSRuntime Seems like JSContext is the only thing that matters now. Signed-off-by: Ray Strode https://bugs.freedesktop.org/show_bug.cgi?id=105865 --- src/polkitbackend/polkitbackendjsauthority.cpp | 10 ++-------- 1 file 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); -- cgit v1.2.1