[gjs: 7/12] value: Rewrite incorrect and obsolete comments
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs: 7/12] value: Rewrite incorrect and obsolete comments
- Date: Sun, 11 Apr 2021 23:22:50 +0000 (UTC)
commit 39d54989e6c2f26eba964ba13fbf02dff1ea37db
Author: Philip Chimento <philip chimento gmail com>
Date: Sun Mar 21 19:59:11 2021 -0700
value: Rewrite incorrect and obsolete comments
FIXME: Check what happens if GValue remains uninitialized
gi/value.cpp | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/gi/value.cpp b/gi/value.cpp
index fea7f9da..bba2702a 100644
--- a/gi/value.cpp
+++ b/gi/value.cpp
@@ -267,11 +267,14 @@ closure_marshal(GClosure *closure,
exit(code);
}
- // Any exception now pending, is handled when returning control to JS
-
+ // null return_value means the closure wasn't expected to return a value.
+ // Discard the JS function's return value in that case.
if (return_value != NULL) {
if (rval.isUndefined()) {
- /* something went wrong invoking, error should be set already */
+ // Either an exception was thrown and logged, or the JS function
+ // returned undefined. Leave the GValue uninitialized.
+ // FIXME: not sure what happens on the other side with an
+ // uninitialized GValue!
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]