diff options
author | Ray Strode <rstrode@redhat.com> | 2018-03-22 13:00:33 -0400 |
---|---|---|
committer | Ray Strode <rstrode@redhat.com> | 2018-04-03 14:16:42 -0400 |
commit | 0ebf6c4cbc359f8b926f7601e246edefe055c5eb (patch) | |
tree | 231f18945fc48b21784aafb84d575978bc3b5607 /src | |
parent | a4a5511f2b53c8bf9036ff776ab62c11a183c438 (diff) | |
download | polkit-0ebf6c4cbc359f8b926f7601e246edefe055c5eb.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
Diffstat (limited to 'src')
-rw-r--r-- | src/polkitbackend/polkitbackendjsauthority.cpp | 7 |
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", |