summaryrefslogtreecommitdiff
path: root/gi/closure.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gi/closure.cpp')
-rw-r--r--gi/closure.cpp24
1 files changed, 3 insertions, 21 deletions
diff --git a/gi/closure.cpp b/gi/closure.cpp
index bd98390b..ec34b4b9 100644
--- a/gi/closure.cpp
+++ b/gi/closure.cpp
@@ -163,13 +163,9 @@ static void closure_finalize(void*, GClosure* closure) {
self->~Closure();
}
-bool
-gjs_closure_invoke(GClosure *closure,
- JS::HandleObject this_obj,
- const JS::HandleValueArray& args,
- JS::MutableHandleValue retval,
- bool return_exception)
-{
+bool gjs_closure_invoke(GClosure* closure, JS::HandleObject this_obj,
+ const JS::HandleValueArray& args,
+ JS::MutableHandleValue retval) {
Closure *c;
JSContext *context;
@@ -196,20 +192,6 @@ gjs_closure_invoke(GClosure *closure,
"Closure invocation failed (exception should have been thrown) "
"closure %p function %p",
closure, c->func.debug_addr());
- /* If an exception has been thrown, log it, unless the caller
- * explicitly wants to handle it manually (for example to turn it
- * into a GError), in which case it replaces the return value
- * (which is not valid anyway) */
- if (JS_IsExceptionPending(context)) {
- if (return_exception)
- JS_GetPendingException(context, retval);
- else
- gjs_log_exception_uncaught(context);
- } else {
- retval.setUndefined();
- gjs_debug_closure("Closure invocation failed but no exception was set?"
- "closure %p", closure);
- }
return false;
}