Commit 0b3c5d2a authored by Ray Strode's avatar Ray Strode

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's avatarRay Strode <rstrode@redhat.com>

https://bugs.freedesktop.org/show_bug.cgi?id=105865
parent a6d5f53e
......@@ -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",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment