After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 682290 - Gio: Don't eat errors when trying to call the initial asyncCallback
Gio: Don't eat errors when trying to call the initial asyncCallback
Status: RESOLVED FIXED
Product: gjs
Classification: Bindings
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gjs-maint
gjs-maint
Depends on:
Blocks:
 
 
Reported: 2012-08-20 19:03 UTC by Jasper St. Pierre (not reading bugmail)
Modified: 2012-10-03 16:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Gio: Don't eat errors when trying to call the initial asyncCallback (1.38 KB, patch)
2012-08-20 19:04 UTC, Jasper St. Pierre (not reading bugmail)
reviewed Details | Review
Gio: Don't eat errors when trying to call the initial asyncCallback (1.33 KB, patch)
2012-10-03 01:14 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review

Description Jasper St. Pierre (not reading bugmail) 2012-08-20 19:03:59 UTC
See patch. Turns out several JS errors were captured and went to the
async error path, which is incorrect.
Comment 1 Jasper St. Pierre (not reading bugmail) 2012-08-20 19:04:01 UTC
Created attachment 221878 [details] [review]
Gio: Don't eat errors when trying to call the initial asyncCallback
Comment 2 Giovanni Campagna 2012-08-20 19:17:28 UTC
Review of attachment 221878 [details] [review]:

Good to go, if you want.

::: modules/overrides/Gio.js
@@ +189,3 @@
         if (asyncCallback)
             obj.init_async(GLib.PRIORITY_DEFAULT, cancellable, function(initable, result) {
+                let caughtErrorWhenInitting = null;

Calling it error was too simple, heh?

@@ +200,3 @@
+                } else {
+                    asyncCallback(null, caughtErrorWhenInitting);
+                    log(caughtErrorWhenInitting);

Why this log?
Comment 3 Jasper St. Pierre (not reading bugmail) 2012-08-20 19:25:09 UTC
Review of attachment 221878 [details] [review]:

::: modules/overrides/Gio.js
@@ +200,3 @@
+                } else {
+                    asyncCallback(null, caughtErrorWhenInitting);
+                    log(caughtErrorWhenInitting);

Because I left it in by accident.
Comment 4 Jasper St. Pierre (not reading bugmail) 2012-10-03 01:14:25 UTC
Created attachment 225642 [details] [review]
Gio: Don't eat errors when trying to call the initial asyncCallback
Comment 5 Giovanni Campagna 2012-10-03 16:08:47 UTC
Review of attachment 225642 [details] [review]:

Go go go!
Comment 6 Jasper St. Pierre (not reading bugmail) 2012-10-03 16:36:45 UTC
Attachment 225642 [details] pushed as f2bef7e - Gio: Don't eat errors when trying to call the initial asyncCallback