[gjs/april-maintenance: 1/11] closure: Remove redundant check for pending exception
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs/april-maintenance: 1/11] closure: Remove redundant check for pending exception
- Date: Fri, 1 May 2020 04:47:27 +0000 (UTC)
commit f49530a3f8a7a5e6e2bc030848fa6650278abf08
Author: Philip Chimento <philip chimento gmail com>
Date: Sun Apr 5 22:39:13 2020 -0700
closure: Remove redundant check for pending exception
gjs_log_exception() already checks if an exception is pending, and
returns false if not.
gi/closure.cpp | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/gi/closure.cpp b/gi/closure.cpp
index 04597264..f654cff4 100644
--- a/gi/closure.cpp
+++ b/gi/closure.cpp
@@ -201,10 +201,9 @@ gjs_closure_invoke(GClosure *closure,
context = c->context;
JSAutoRealm ar(context, JS_GetFunctionObject(c->func));
- if (JS_IsExceptionPending(context)) {
+ if (gjs_log_exception(context)) {
gjs_debug_closure("Exception was pending before invoking callback??? "
"Not expected - closure %p", closure);
- gjs_log_exception(context);
}
JS::RootedFunction func(context, c->func);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]