summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2018-03-22 13:00:33 -0400
committerRay Strode <rstrode@redhat.com>2018-04-03 10:49:28 -0400
commit5c18293aa2ce39b5dc857cf227e309d221fcb768 (patch)
tree6fd2b567bfd749b2f76e5698a62d6ac85e29e093
parent1ac9c65ed049120cb2f4685ca92f6a55687a82f9 (diff)
downloadpolkit-5c18293aa2ce39b5dc857cf227e309d221fcb768.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. Signed-off-by: Ray Strode <rstrode@redhat.com> https://bugs.freedesktop.org/show_bug.cgi?id=105865
-rw-r--r--src/polkitbackend/polkitbackendjsauthority.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/polkitbackend/polkitbackendjsauthority.cpp b/src/polkitbackend/polkitbackendjsauthority.cpp
index 394e743..a3a21f1 100644
--- a/src/polkitbackend/polkitbackendjsauthority.cpp
+++ b/src/polkitbackend/polkitbackendjsauthority.cpp
@@ -207,7 +207,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));
@@ -215,7 +214,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
@@ -468,7 +467,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);