summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Chimento <philip.chimento@gmail.com>2017-04-28 00:07:16 -0700
committerPhilip Chimento <philip.chimento@gmail.com>2017-04-28 00:11:10 -0700
commit1884a523f6c20b6cbee0b37dde31841a582e20ef (patch)
treed311bfd16e99b2ebd374cc84f6f16e90fa7e0455
parent67a0d7e955460dbd1cd28c7c7fa45ddc3edcfea1 (diff)
downloadgjs-1884a523f6c20b6cbee0b37dde31841a582e20ef.tar.gz
modules/console: Bring back fancy error reporter
At some point we lost our custom error reporter from gjs-console. It doesn't compile with SpiderMonkey 45 and so will have to be changed, but I noticed it was never being called. Instead of removing it, let's restore it. https://bugzilla.gnome.org/show_bug.cgi?id=781882
-rw-r--r--modules/console.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/console.cpp b/modules/console.cpp
index 8fd3fd41..00db76f0 100644
--- a/modules/console.cpp
+++ b/modules/console.cpp
@@ -214,8 +214,9 @@ gjs_console_interact(JSContext *context,
gjs_schedule_gc_if_needed(context);
if (JS_GetPendingException(context, &result)) {
- str = JS::ToString(context, result);
- JS_ClearPendingException(context);
+ if (!JS_ReportPendingException(context))
+ return false;
+ goto next;
} else if (result.isUndefined()) {
goto next;
} else {