[gjs/wip/ptomato/mozjs52: 9/9] WIP - fixup error reporting
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs/wip/ptomato/mozjs52: 9/9] WIP - fixup error reporting
- Date: Wed, 3 May 2017 06:53:20 +0000 (UTC)
commit 1f39ed8b06b59243d6202aabaabdbccb5b373c1b
Author: Philip Chimento <philip chimento gmail com>
Date: Tue May 2 23:17:40 2017 -0700
WIP - fixup error reporting
See
https://bugzilla.mozilla.org/show_bug.cgi?id=1276400
https://bugzilla.mozilla.org/show_bug.cgi?id=1277278
gjs/jsapi-util.cpp | 2 +-
gjs/runtime.cpp | 2 +-
modules/console.cpp | 7 ++++---
3 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/gjs/jsapi-util.cpp b/gjs/jsapi-util.cpp
index 83df12e..81d6b05 100644
--- a/gjs/jsapi-util.cpp
+++ b/gjs/jsapi-util.cpp
@@ -90,10 +90,10 @@ gjs_init_context_standard (JSContext *context,
/* setDontReportUncaught: Don't send exceptions to our error report handler;
* instead leave them set. This allows us to get at the exception object.
+ * FIXME
*
* setExtraWarnings: Report warnings to error reporter function.
*/
- JS::ContextOptionsRef(context).setDontReportUncaught(true);
JS::ContextOptionsRef(context).setExtraWarnings(extra_warnings);
if (!g_getenv("GJS_DISABLE_JIT")) {
diff --git a/gjs/runtime.cpp b/gjs/runtime.cpp
index 83c272a..a98e233 100644
--- a/gjs/runtime.cpp
+++ b/gjs/runtime.cpp
@@ -222,7 +222,7 @@ gjs_create_js_context(GjsContext *js_context)
// JS_SetGCParameter(cx, JSGC_ALLOCATION_THRESHOLD, 30);
// JS_SetGCParameter(cx, JSGC_DECOMMIT_THRESHOLD, 32);
JS_SetLocaleCallbacks(cx, &gjs_locale_callbacks);
- JS_SetErrorReporter(cx, gjs_error_reporter);
+ //JS_SetErrorReporter(cx, gjs_error_reporter);
return cx;
}
diff --git a/modules/console.cpp b/modules/console.cpp
index df0d5f8..ac56724 100644
--- a/modules/console.cpp
+++ b/modules/console.cpp
@@ -177,7 +177,8 @@ gjs_console_interact(JSContext *context,
int startline;
FILE *file = stdin;
- JS_SetErrorReporter(JS_GetRuntime(context), gjs_console_error_reporter);
+ //FIXME
+ //JS_SetErrorReporter(JS_GetRuntime(context), gjs_console_error_reporter);
/* It's an interactive filehandle; drop into read-eval-print loop. */
lineno = 1;
@@ -221,8 +222,8 @@ gjs_console_interact(JSContext *context,
gjs_schedule_gc_if_needed(context);
if (JS_GetPendingException(context, &result)) {
- if (!JS_ReportPendingException(context))
- return false;
+ // if (!JS_ReportPendingException(context))
+ // return false;
goto next;
} else if (result.isUndefined()) {
goto next;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]