summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2018-03-23 10:16:17 -0400
committerRay Strode <rstrode@redhat.com>2018-03-28 16:46:36 -0400
commitb850122c12abc4673b00f8b810f0536d078d9a20 (patch)
treebfdd0aef5f5f2b10a0297703363e0fe51b34c8a2
parent2e970bedd11b27ae22fdcf6bb3994b0942f582b1 (diff)
downloadpolkit-b850122c12abc4673b00f8b810f0536d078d9a20.tar.gz
jsauthority: root some locals to the context
-rw-r--r--src/polkitbackend/polkitbackendjsauthority.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/polkitbackend/polkitbackendjsauthority.cpp b/src/polkitbackend/polkitbackendjsauthority.cpp
index b781a75..0dd09f5 100644
--- a/src/polkitbackend/polkitbackendjsauthority.cpp
+++ b/src/polkitbackend/polkitbackendjsauthority.cpp
@@ -318,7 +318,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))
@@ -753,7 +753,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;
@@ -884,7 +884,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 ());
@@ -961,7 +961,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().