Closed Bug 960669 Opened 6 years ago Closed 6 years ago

Exiting the browser window should exit the Browser Toolbox

Categories

(DevTools :: Framework, enhancement)

enhancement
Not set

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 29

People

(Reporter: bgrins, Assigned: jryans)

Details

Attachments

(1 file, 1 obsolete file)

Not sure if this will be reproducible on another machine, but I've tested with multiple clean profiles on mine:

I have a profile with chrome debugging and remote debugging enabled
* Open browser toolbox.  This works.
* End the process (either with ctrl+c or cmd+q)
* Open the browser again and try to open Browser Toolbox again.  Nothing happens, but I see this log in the console:

    [93112] WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80040111: file /fx-team/dom/events/nsContentEventHandler.cpp, line 96
    [93112] WARNING: failed to bind socket: file /fx-team/netwerk/base/src/nsServerSocket.cpp, line 355
    JavaScript error: , line 0: uncaught exception: 2147746065

Both `mach run -jsdebugger` and Tools->Web Developer->Browser Toolbox fail to open any windows.  Switching profiles doesn't seem to help either.
From more discussion, it seems this is due to the Browser Toolbox's process remaining alive after the toolbox is closed.  This might be related to how the toolbox is closed (window X vs. toolbox X vs. quit).
Are you sure you are closing both processes? Does the second icon in the dock disappear along with the first? In my experience, killing the browser process will leave the browser toolbox process unaffected. I have to quit it directly with Cmd-Q. Or is this an enhancement request to have the browser process exit the spawned browser toolbox as well?
OS: Mac OS X → All
Hardware: x86 → All
I realized that I was not closing the toolbox, but killing the browser process only in the original issue.  Now I've noticed that there are ways to close the toolbox process but not having it disappear from the dock (I believe I've been able to reproduce by quickly focusing back on the main browser window but that could just be voodoo).

With this knowledge, I would love an enhancement that causes exiting the browser process to exit the spawned browser toolbox as well.
OK, agreed. Editing subject to clarify.
Severity: normal → enhancement
Summary: Browser Toolbox not opening after first load → Exiting the browser window should exit the Browser Toolbox
Assignee: nobody → jryans
Status: NEW → ASSIGNED
Comment on attachment 8364552 [details] [diff] [review]
Close Browser Toolbox on browser shutdown

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

Works great!

::: browser/devtools/framework/ToolboxProcess.jsm
@@ +155,5 @@
>      }
>    },
>  
>    /**
>     * Closes the remote debugger, removing the profile and killing the process.

We are no longer removing the profile, would you mind updating the comment?
Attachment #8364552 - Flags: review?(past) → review+
Carrying over r+ from attachment 8364552 [details] [diff] [review].

(In reply to Panos Astithas [:past] from comment #6)
> ::: browser/devtools/framework/ToolboxProcess.jsm
> @@ +155,5 @@
> >      }
> >    },
> >  
> >    /**
> >     * Closes the remote debugger, removing the profile and killing the process.
> 
> We are no longer removing the profile, would you mind updating the comment?

Done!
Attachment #8364552 - Attachment is obsolete: true
Attachment #8365162 - Flags: review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/13da989bc869
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 29
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.