diff options
author | Ray Strode <rstrode@redhat.com> | 2018-03-23 10:16:17 -0400 |
---|---|---|
committer | Ray Strode <rstrode@redhat.com> | 2018-04-03 14:16:41 -0400 |
commit | a4a5511f2b53c8bf9036ff776ab62c11a183c438 (patch) | |
tree | 859a49c425743c0a79b857a594b8fbe998a10d85 | |
parent | 84bfad02e91a529d63b44e7f27f62cce6e559a70 (diff) | |
download | polkit-a4a5511f2b53c8bf9036ff776ab62c11a183c438.tar.gz |
jsauthority: root some locals to the context
Signed-off-by: Ray Strode <rstrode@redhat.com>
https://bugs.freedesktop.org/show_bug.cgi?id=105865
-rw-r--r-- | src/polkitbackend/polkitbackendjsauthority.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/polkitbackend/polkitbackendjsauthority.cpp b/src/polkitbackend/polkitbackendjsauthority.cpp index be83df8..9bb6da8 100644 --- a/src/polkitbackend/polkitbackendjsauthority.cpp +++ b/src/polkitbackend/polkitbackendjsauthority.cpp @@ -317,7 +317,7 @@ load_scripts (PolkitBackendJsAuthority *authority) } /* evaluate the script */ - JS::Value rval; + JS::RootedValue rval(authority->priv->cx); if (!execute_script_with_runaway_killer (authority, script, &rval)) @@ -742,7 +742,7 @@ subject_to_jsval (PolkitBackendJsAuthority *authority, gboolean ret = FALSE; JS::Value ret_jsval; const char *src; - JSObject *obj; + JS::RootedObject obj(authority->priv->cx); pid_t pid; uid_t uid; gchar *user_name = NULL; @@ -873,7 +873,7 @@ action_and_details_to_jsval (PolkitBackendJsAuthority *authority, gboolean ret = FALSE; JS::Value ret_jsval; const char *src; - JSObject *obj; + JS::RootedObject obj(authority->priv->cx); gchar **keys; guint n; JS::RootedObject global(authority->priv->cx, authority->priv->js_global->get ()); @@ -934,7 +934,7 @@ js_operation_callback (JSContext *cx) { PolkitBackendJsAuthority *authority = POLKIT_BACKEND_JS_AUTHORITY (JS_GetContextPrivate (cx)); JSString *val_str; - JS::Value val; + JS::RootedValue val(cx); /* This callback can be called by the runtime at any time without us causing * it by JS_TriggerOperationCallback(). |