Commit 9de79e68 authored by Ray Strode's avatar Ray Strode

jsauthority: s/JSBool/bool/

It's been gone since mozjs31
parent af63d4ac
......@@ -92,7 +92,7 @@ struct _PolkitBackendJsAuthorityPrivate
GList *scripts;
};
static JSBool execute_script_with_runaway_killer (PolkitBackendJsAuthority *authority,
static bool execute_script_with_runaway_killer (PolkitBackendJsAuthority *authority,
JSScript *script,
jsval *rval);
......@@ -193,9 +193,9 @@ static JSClass js_polkit_class = {
&js_polkit_class_ops
};
static JSBool js_polkit_log (JSContext *cx, unsigned argc, jsval *vp);
static JSBool js_polkit_spawn (JSContext *cx, unsigned argc, jsval *vp);
static JSBool js_polkit_user_is_in_netgroup (JSContext *cx, unsigned argc, jsval *vp);
static bool js_polkit_log (JSContext *cx, unsigned argc, jsval *vp);
static bool js_polkit_spawn (JSContext *cx, unsigned argc, jsval *vp);
static bool js_polkit_user_is_in_netgroup (JSContext *cx, unsigned argc, jsval *vp);
static JSFunctionSpec js_polkit_functions[] =
{
......@@ -732,7 +732,7 @@ set_property_bool (PolkitBackendJsAuthority *authority,
gboolean value)
{
jsval value_jsval;
value_jsval = BOOLEAN_TO_JSVAL ((JSBool) value);
value_jsval = BOOLEAN_TO_JSVAL ((bool) value);
JS_SetProperty (authority->priv->cx, obj, name, &value_jsval);
}
......@@ -952,7 +952,7 @@ runaway_killer_thread_func (gpointer user_data)
/* ---------------------------------------------------------------------------------------------------- */
static JSBool
static bool
js_operation_callback (JSContext *cx)
{
PolkitBackendJsAuthority *authority = POLKIT_BACKEND_JS_AUTHORITY (JS_GetContextPrivate (cx));
......@@ -966,7 +966,7 @@ js_operation_callback (JSContext *cx)
if (!authority->priv->rkt_timeout_pending)
{
g_mutex_unlock (&authority->priv->rkt_timeout_pending_mutex);
return JS_TRUE;
return true;
}
authority->priv->rkt_timeout_pending = FALSE;
g_mutex_unlock (&authority->priv->rkt_timeout_pending_mutex);
......@@ -980,7 +980,7 @@ js_operation_callback (JSContext *cx)
val = STRING_TO_JSVAL (val_str);
JS_SetPendingException (authority->priv->cx, val);
JS_SetOperationCallback (authority->priv->cx, js_operation_callback);
return JS_FALSE;
return false;
}
static gboolean
......@@ -1029,12 +1029,12 @@ runaway_killer_teardown (PolkitBackendJsAuthority *authority)
authority->priv->rkt_source = NULL;
}
static JSBool
static bool
execute_script_with_runaway_killer (PolkitBackendJsAuthority *authority,
JSScript *script,
jsval *rval)
{
JSBool ret;
bool ret;
runaway_killer_setup (authority);
ret = JS_ExecuteScript (authority->priv->cx,
......@@ -1046,14 +1046,14 @@ execute_script_with_runaway_killer (PolkitBackendJsAuthority *authority,
return ret;
}
static JSBool
static bool
call_js_function_with_runaway_killer (PolkitBackendJsAuthority *authority,
const char *function_name,
unsigned argc,
jsval *argv,
jsval *rval)
{
JSBool ret;
bool ret;
runaway_killer_setup (authority);
ret = JS_CallFunctionName(authority->priv->cx,
authority->priv->js_polkit,
......@@ -1281,13 +1281,13 @@ polkit_backend_js_authority_check_authorization_sync (PolkitBackendInteractiveAu
/* ---------------------------------------------------------------------------------------------------- */
static JSBool
static bool
js_polkit_log (JSContext *cx,
unsigned argc,
jsval *vp)
{
/* PolkitBackendJsAuthority *authority = POLKIT_BACKEND_JS_AUTHORITY (JS_GetContextPrivate (cx)); */
JSBool ret = JS_FALSE;
bool ret = false;
JSString *str;
char *s;
......@@ -1298,7 +1298,7 @@ js_polkit_log (JSContext *cx,
JS_ReportWarningUTF8 (cx, s);
JS_free (cx, s);
ret = JS_TRUE;
ret = true;
JS_SET_RVAL (cx, vp, JSVAL_VOID); /* return undefined */
out:
......@@ -1366,13 +1366,13 @@ spawn_cb (GObject *source_object,
g_main_loop_quit (data->loop);
}
static JSBool
static bool
js_polkit_spawn (JSContext *cx,
unsigned js_argc,
jsval *vp)
{
/* PolkitBackendJsAuthority *authority = POLKIT_BACKEND_JS_AUTHORITY (JS_GetContextPrivate (cx)); */
JSBool ret = JS_FALSE;
bool ret = false;
JSObject *array_object;
gchar *standard_output = NULL;
gchar *standard_error = NULL;
......@@ -1469,7 +1469,7 @@ js_polkit_spawn (JSContext *cx,
goto out;
}
ret = JS_TRUE;
ret = true;
ret_jsstr = JS_NewStringCopyZ (cx, standard_output);
JS_SET_RVAL (cx, vp, STRING_TO_JSVAL (ret_jsstr));
......@@ -1489,18 +1489,18 @@ js_polkit_spawn (JSContext *cx,
/* ---------------------------------------------------------------------------------------------------- */
static JSBool
static bool
js_polkit_user_is_in_netgroup (JSContext *cx,
unsigned argc,
jsval *vp)
{
/* PolkitBackendJsAuthority *authority = POLKIT_BACKEND_JS_AUTHORITY (JS_GetContextPrivate (cx)); */
JSBool ret = JS_FALSE;
bool ret = false;
JSString *user_str;
JSString *netgroup_str;
char *user;
char *netgroup;
JSBool is_in_netgroup = JS_FALSE;
bool is_in_netgroup = false;
if (!JS_ConvertArguments (cx, argc, JS_ARGV (cx, vp), "SS", &user_str, &netgroup_str))
goto out;
......@@ -1513,13 +1513,13 @@ js_polkit_user_is_in_netgroup (JSContext *cx,
user,
NULL)) /* domain */
{
is_in_netgroup = JS_TRUE;
is_in_netgroup = true;
}
JS_free (cx, netgroup);
JS_free (cx, user);
ret = JS_TRUE;
ret = true;
JS_SET_RVAL (cx, vp, BOOLEAN_TO_JSVAL (is_in_netgroup));
out:
......
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