summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2018-03-23 10:48:44 -0400
committerRay Strode <rstrode@redhat.com>2018-03-28 16:46:35 -0400
commitd8b9b44a711a856f88baeaa1e59e2c8ff1e88a59 (patch)
tree6d3e8d45b90c20fc21a687cc8fdac2ceeeae7692
parent72dae4cb1df1f5b655116141a3ad739a6e0db9f8 (diff)
downloadpolkit-d8b9b44a711a856f88baeaa1e59e2c8ff1e88a59.tar.gz
jsauthority: JSVAL_TO_STRING (s) to s.toString()
-rw-r--r--src/polkitbackend/polkitbackendjsauthority.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/polkitbackend/polkitbackendjsauthority.cpp b/src/polkitbackend/polkitbackendjsauthority.cpp
index 3d9a57f..cc08e73 100644
--- a/src/polkitbackend/polkitbackendjsauthority.cpp
+++ b/src/polkitbackend/polkitbackendjsauthority.cpp
@@ -1130,7 +1130,7 @@ polkit_backend_js_authority_get_admin_auth_identities (PolkitBackendInteractiveA
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);
if (ret_str == NULL)
{
@@ -1246,7 +1246,7 @@ polkit_backend_js_authority_check_authorization_sync (PolkitBackendInteractiveAu
goto out;
}
- ret_jsstr = JSVAL_TO_STRING (rval);
+ ret_jsstr = rval.toString();
ret_utf16 = JS_GetStringCharsZ (authority->priv->cx, ret_jsstr);
ret_str = g_utf16_to_utf8 (ret_utf16, -1, NULL, NULL, &error);
if (ret_str == NULL)
@@ -1411,7 +1411,7 @@ js_polkit_spawn (JSContext *cx,
JS_ReportErrorUTF8 (cx, "Element %d is not a string", n);
goto out;
}
- s = JS_EncodeString (cx, JSVAL_TO_STRING (elem_val));
+ s = JS_EncodeString (cx, elem_val.toString());
argv[n] = g_strdup (s);
JS_free (cx, s);
}