Commit d8b9b44a authored by Ray Strode's avatar Ray Strode

jsauthority: JSVAL_TO_STRING (s) to s.toString()

parent 72dae4cb
...@@ -1130,7 +1130,7 @@ polkit_backend_js_authority_get_admin_auth_identities (PolkitBackendInteractiveA ...@@ -1130,7 +1130,7 @@ polkit_backend_js_authority_get_admin_auth_identities (PolkitBackendInteractiveA
goto out; goto out;
} }
ret_jsstr = JSVAL_TO_STRING (rval); ret_jsstr = rval.toString();
ret_str = g_utf16_to_utf8 (JS_GetStringCharsZ (authority->priv->cx, ret_jsstr), -1, NULL, NULL, NULL); ret_str = g_utf16_to_utf8 (JS_GetStringCharsZ (authority->priv->cx, ret_jsstr), -1, NULL, NULL, NULL);
if (ret_str == NULL) if (ret_str == NULL)
{ {
...@@ -1246,7 +1246,7 @@ polkit_backend_js_authority_check_authorization_sync (PolkitBackendInteractiveAu ...@@ -1246,7 +1246,7 @@ polkit_backend_js_authority_check_authorization_sync (PolkitBackendInteractiveAu
goto out; goto out;
} }
ret_jsstr = JSVAL_TO_STRING (rval); ret_jsstr = rval.toString();
ret_utf16 = JS_GetStringCharsZ (authority->priv->cx, ret_jsstr); ret_utf16 = JS_GetStringCharsZ (authority->priv->cx, ret_jsstr);
ret_str = g_utf16_to_utf8 (ret_utf16, -1, NULL, NULL, &error); ret_str = g_utf16_to_utf8 (ret_utf16, -1, NULL, NULL, &error);
if (ret_str == NULL) if (ret_str == NULL)
...@@ -1411,7 +1411,7 @@ js_polkit_spawn (JSContext *cx, ...@@ -1411,7 +1411,7 @@ js_polkit_spawn (JSContext *cx,
JS_ReportErrorUTF8 (cx, "Element %d is not a string", n); JS_ReportErrorUTF8 (cx, "Element %d is not a string", n);
goto out; goto out;
} }
s = JS_EncodeString (cx, JSVAL_TO_STRING (elem_val)); s = JS_EncodeString (cx, elem_val.toString());
argv[n] = g_strdup (s); argv[n] = g_strdup (s);
JS_free (cx, s); JS_free (cx, 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