summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2018-03-22 13:00:33 -0400
committerRay Strode <rstrode@redhat.com>2018-04-03 10:50:00 -0400
commit0b3c5d2a252d8873907833a8f8bb991fa758ac68 (patch)
tree231f18945fc48b21784aafb84d575978bc3b5607
parenta6d5f53e048c742e52119c81be88113faef4248b (diff)
downloadpolkit-0b3c5d2a252d8873907833a8f8bb991fa758ac68.tar.gz
jsauthority: adapt arguments for new JS::Compile API
The global object is implicit now and the result is an out arg. This commit adapts to the new api. Signed-off-by: Ray Strode <rstrode@redhat.com> https://bugs.freedesktop.org/show_bug.cgi?id=105865
-rw-r--r--src/polkitbackend/polkitbackendjsauthority.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/polkitbackend/polkitbackendjsauthority.cpp b/src/polkitbackend/polkitbackendjsauthority.cpp
index 9bb6da8..f20ec9d 100644
--- a/src/polkitbackend/polkitbackendjsauthority.cpp
+++ b/src/polkitbackend/polkitbackendjsauthority.cpp
@@ -302,13 +302,8 @@ load_scripts (PolkitBackendJsAuthority *authority)
const gchar *filename = (gchar *)l->data;
JS::RootedScript script(authority->priv->cx);
JS::CompileOptions options(authority->priv->cx);
- JS::RootedObject obj(authority->priv->cx,authority->priv->js_global);
options.setUTF8(true);
- script = JS::Compile (authority->priv->cx,
- obj, options,
- filename);
-
- if (script == NULL)
+ if (!JS::Compile (authority->priv->cx, options, filename, &script))
{
polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority),
"Error compiling script %s",