Closed Bug 1144392 Opened 9 years ago Closed 9 years ago

Show an error message in Browser Toolbox when there is an error on startup

Categories

(DevTools :: Framework, defect)

x86
macOS
defect
Not set
normal

Tracking

(firefox39 fixed)

RESOLVED FIXED
Firefox 39
Tracking Status
firefox39 --- fixed

People

(Reporter: bgrins, Assigned: bgrins)

References

Details

Attachments

(1 file)

I occasionally get a blank window when opening the browser toolbox multiple times on the same session.  We should make an error visible if it happens.
Uploading original patch for this from Bug 945663.  See Bug 945663 Comments 3 - 5.
Here is a reliable way to trigger *an* error message.  Without any remote server running, just run:

./mach run --profile /tmp/foobar --chrome chrome://browser/content/devtools/framework/toolbox-process-window.xul --purgecaches --jsconsole

This is a contrived example since if the browser toolbox is opened via the menu there should be a remote debugging server running, but the intermittent blank windows when closing and reopening BT windows could likely be caused due to a similar connection error.
To trigger a different error (on shutdown):

./mach run -start-debugger-server 6080
./mach run --profile /tmp/foobar --chrome chrome://browser/content/devtools/framework/toolbox-process-window.xul --purgecaches --jsconsole
Close the BT window

Throws: [Exception... "Component returned failure code: 0x80004002 (NS_NOINTERFACE) [nsIInterfaceRequestor.getInterface]"  nsresult: "0x80004002 (NS_NOINTERFACE)"  location: "JS frame :: resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/actors/webbrowser.js :: TabActor.prototype.window :: line 676"  data: no]
Stack: TabActor.prototype.window@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/actors/webbrowser.js:676:0
TabActor.prototype._navigate@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/actors/webbrowser.js:1510:8
TabActor.prototype._changeTopLevelDocument/</<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/actors/webbrowser.js:1356:8
makeInfallible/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/DevToolsUtils.js:82:13
Line: 676, column: 0

Notice that this doesn't show up in the error message, but it wouldn't be helpful even if it did, since the window is closing at that moment.
Comment on attachment 8578956 [details] [diff] [review]
browser-toolbox-error-message.patch

As you pointed out, the error using the STR is totally expected (since no server is running).  But I think it'd still be helpful to display this message, since it may help debug intermittent issues like Bug 945663 or other situations where I've run into the blank window problem.
Attachment #8578956 - Flags: review?(jryans)
Comment on attachment 8578956 [details] [diff] [review]
browser-toolbox-error-message.patch

Cool, seems good.
Attachment #8578956 - Flags: review?(jryans) → review+
Keywords: checkin-needed
https://hg.mozilla.org/integration/fx-team/rev/62729dad4a89
Assignee: nobody → bgrinstead
Keywords: checkin-needed
Whiteboard: [fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/62729dad4a89
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 39
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: