Closed Bug 1024787 Opened 10 years ago Closed 10 years ago

Fix uncaught promise rejections in DevTools framework

Categories

(DevTools :: General, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 33

People

(Reporter: jsantell, Assigned: jsantell)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

When uncaught promise rejections throw errors, the following occur in framework:

0:38.24 TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/browser/devtools/framework/test/browser_devtools_api.js | A promise chain failed to handle a rejection at resource://gre/modules/commonjs/toolkit/loader.js -> resource:///modules/devtools/framework/toolbox.js:901 - TypeError: this.doc is undefined
 0:38.24 TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/browser/devtools/framework/test/browser_new_activation_workflow.js | A promise chain failed to handle a rejection at resource://gre/modules/commonjs/toolkit/loader.js -> resource:///modules/devtools/framework/toolbox.js:901 - TypeError: this.doc is undefined
 0:38.24 TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/browser/devtools/framework/test/browser_toolbox_window_reload_target.js | A promise chain failed to handle a rejection - unknownError
 0:38.24 TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/browser/devtools/framework/test/browser_toolbox_window_reload_target.js | A promise chain failed to handle a rejection - unknownError
 0:38.28 TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/browser/devtools/framework/test/browser_toolbox_window_reload_target.js | A promise chain failed to handle a rejection - unknownError
 0:38.28 TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/browser/devtools/framework/test/browser_toolbox_window_reload_target.js | A promise chain failed to handle a rejection - unknownError


The keybinding test is tracked in bug 991075

 0:38.24 TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/browser/devtools/framework/test/browser_keybindings.js | A promise chain failed to handle a rejection at resource://gre/modules/commonjs/toolkit/loader.js -> resource:///modules/devtools/framework/toolbox.js:901 - TypeError: this.doc is undefined
Blocks: 1018184
Making a new bug (bug 1024789) for the remaining devtools/framework promise failure, as it seems like it may be in a different tool, and much larger than these.

 TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/browser/devtools/framework/test/browser_toolbox_window_reload_target.js | A promise chain failed to handle a rejection - unknownError
Assignee: nobody → jsantell
Status: NEW → ASSIGNED
Attachment #8439601 - Flags: review?(jryans)
Comment on attachment 8439601 [details] [diff] [review]
1024787-devtools-framework-rejections.patch

Review of attachment 8439601 [details] [diff] [review]:
-----------------------------------------------------------------

::: browser/devtools/framework/test/browser_devtools_api.js
@@ -42,4 @@
>      is(toolbox.target, target, "toolbox target is correct");
>      is(toolbox._host.hostTab, gBrowser.selectedTab, "toolbox host is correct");
>      continueTests(toolbox);
> -  }).then(null, console.error);

Why remove this?  Isn't it needed to log any rejections?

@@ -73,2 @@
>      finishUp();
> -  }).then(null, console.error);

Same here.
Attachment #8439601 - Flags: review?(jryans) → review+
With the patch in bug 991040 lands, uncaught errors will throw, so we'll see them there (which is why we're fixing these uncaught rejections in bug 	1018184, correct me if I'm misunderstanding)
(In reply to Jordan Santell [:jsantell] [@jsantell] from comment #3)
> With the patch in bug 991040 lands, uncaught errors will throw, so we'll see
> them there (which is why we're fixing these uncaught rejections in bug 
> 1018184, correct me if I'm misunderstanding)

Haha, yes, makes sense.  Too late in the day for thinking clearly...
:D
Attachment #8439601 - Attachment is obsolete: true
Attachment #8439629 - Flags: review+
Do you have a Try link for this by chance? :)
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/8190adf4e718
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 33
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: