Commit 8a043c96 authored by Ray Strode's avatar Ray Strode

jsauthority: s/STRING_TO_JSVAL/JS::StringValue/

parent e4ef144d
......@@ -681,7 +681,7 @@ set_property_str (PolkitBackendJsAuthority *authority,
JSString *value_jsstr;
JS::Value value_jsval;
value_jsstr = JS_NewStringCopyZ (authority->priv->cx, value);
value_jsval = STRING_TO_JSVAL (value_jsstr);
value_jsval = JS::StringValue (value_jsstr);
JS_SetProperty (authority->priv->cx, obj, name, &value_jsval);
}
......@@ -704,7 +704,7 @@ set_property_strv (PolkitBackendJsAuthority *authority,
JS::Value val;
jsstr = JS_NewStringCopyZ (authority->priv->cx, (char *)g_ptr_array_index(value, n));
val = STRING_TO_JSVAL (jsstr);
val = JS::StringValue (jsstr);
JS_SetElement (authority->priv->cx, array_object, n, &val);
}
......@@ -977,7 +977,7 @@ js_operation_callback (JSContext *cx)
/* Throw an exception - this way the JS code can ignore the runaway script handling */
JS_SetOperationCallback (authority->priv->cx, NULL);
val_str = JS_NewStringCopyZ (cx, "Terminating runaway script");
val = STRING_TO_JSVAL (val_str);
val = JS::StringValue (val_str);
JS_SetPendingException (authority->priv->cx, val);
JS_SetOperationCallback (authority->priv->cx, js_operation_callback);
return false;
......@@ -1472,7 +1472,7 @@ js_polkit_spawn (JSContext *cx,
ret = true;
ret_jsstr = JS_NewStringCopyZ (cx, standard_output);
JS_SET_RVAL (cx, vp, STRING_TO_JSVAL (ret_jsstr));
JS_SET_RVAL (cx, vp, JS::StringValue (ret_jsstr));
out:
g_strfreev (argv);
......
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