From 55678d4abcc051ac50707b0bdee40da810443d7f Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Fri, 23 Mar 2018 10:48:44 -0400 Subject: [PATCH] jsauthority: JSVAL_IS_NULL (o) to o.isNull() Signed-off-by: Ray Strode https://bugs.freedesktop.org/show_bug.cgi?id=105865 --- src/polkitbackend/polkitbackendjsauthority.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/polkitbackend/polkitbackendjsauthority.cpp b/src/polkitbackend/polkitbackendjsauthority.cpp index 71394d7..e8fff15 100644 --- a/src/polkitbackend/polkitbackendjsauthority.cpp +++ b/src/polkitbackend/polkitbackendjsauthority.cpp @@ -1211,61 +1211,61 @@ polkit_backend_js_authority_check_authorization_sync (PolkitBackendInteractiveAu g_clear_error (&error); goto out; } if (!subject_to_jsval (authority, subject, user_for_subject, subject_is_local, subject_is_active, &argv[1], &error)) { polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority), "Error converting subject to JS object: %s", error->message); g_clear_error (&error); goto out; } if (!call_js_function_with_runaway_killer (authority, "_runRules", G_N_ELEMENTS (argv), argv, &rval)) { polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority), "Error evaluating authorization rules"); goto out; } - if (JSVAL_IS_NULL (rval)) + if (rval.isNull()) { /* this fine, means there was no match, use implicit authorizations */ good = TRUE; goto out; } if (!rval.isString()) { g_warning ("Expected a string"); goto out; } 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) { g_warning ("Error converting resulting string to UTF-8: %s", error->message); g_clear_error (&error); goto out; } g_strstrip (ret_str); if (!polkit_implicit_authorization_from_string (ret_str, &ret)) { polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority), "Returned result `%s' is not valid", ret_str); goto out; } -- 2.16.2