diff options
author | Ray Strode <rstrode@redhat.com> | 2018-03-22 13:00:33 -0400 |
---|---|---|
committer | Ray Strode <rstrode@redhat.com> | 2018-03-28 16:43:52 -0400 |
commit | 6b238724829960829f032cd1f94af5556f78884e (patch) | |
tree | 25c845127982dcbd03ccb8bbb833c99b11962ba6 | |
parent | ca9017061e1d0367d445c1cc5c2456695ca80a89 (diff) | |
download | polkit-6b238724829960829f032cd1f94af5556f78884e.tar.gz |
jsauthority: JS::SetWarningReporter instead of JS_SetErrorReporter
This commit changes the code to use JS::SetWarningReporter instead
of JS_SetErrorReporter. The latter, as far as I can tell, is
just a slightly renamed version of the former with the args moved
around a little bit.
-rw-r--r-- | src/polkitbackend/polkitbackendjsauthority.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/polkitbackend/polkitbackendjsauthority.cpp b/src/polkitbackend/polkitbackendjsauthority.cpp index 480b0aa..0c1ec44 100644 --- a/src/polkitbackend/polkitbackendjsauthority.cpp +++ b/src/polkitbackend/polkitbackendjsauthority.cpp @@ -208,7 +208,6 @@ static JSFunctionSpec js_polkit_functions[] = /* ---------------------------------------------------------------------------------------------------- */ static void report_error (JSContext *cx, - const char *message, JSErrorReport *report) { PolkitBackendJsAuthority *authority = POLKIT_BACKEND_JS_AUTHORITY (JS_GetContextPrivate (cx)); @@ -216,7 +215,7 @@ static void report_error (JSContext *cx, "%s:%u: %s", report->filename ? report->filename : "<no filename>", (unsigned int) report->lineno, - message); + report->message().c_str()); } static void @@ -469,7 +468,7 @@ polkit_backend_js_authority_constructed (GObject *object) .setIon (FALSE) .setBaseline (FALSE) .setAsmJS (FALSE); - JS_SetErrorReporter(authority->priv->cx, report_error); + JS::SetWarningReporter(authority->priv->cx, report_error); JS_SetContextPrivate (authority->priv->cx, authority); JS_BeginRequest(authority->priv->cx); |