Commit f1ee5278 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.
parent b850122c
......@@ -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",
......
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