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:46:36 -0400
commitf1ee5278fae399ef66e980d8afad89a9303bc9c6 (patch)
treed2691c064b21114e2353019d83bc08f597aace4a
parentb850122c12abc4673b00f8b810f0536d078d9a20 (diff)
downloadpolkit-f1ee5278fae399ef66e980d8afad89a9303bc9c6.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.
-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 0dd09f5..ee9ced9 100644
--- a/src/polkitbackend/polkitbackendjsauthority.cpp
+++ b/src/polkitbackend/polkitbackendjsauthority.cpp
@@ -303,13 +303,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",