Open
Bug 845099
Opened 12 years ago
Updated 2 years ago
unregistering top level windows prevents firefox from quiting
Categories
(Toolkit :: Startup and Profile System, defect, P5)
Tracking
()
NEW
People
(Reporter: irakli, Unassigned)
Details
Recently we've discovered some misbehaviors when attempting to unregister
top level windows in add-on SDK. Details can be found under bug 820953. I'm also
posting comment from ochameau with more details and pointers:
(In reply to Alexandre Poirot (:ochameau) from comment #20)
> As far as I know there is not particular white nor black listing of hidden
> window,
> we just avoid them to be registered on windowwatcher and windowmediator.
>
> We are having issues because RegisterTopLevel shouldn't ever be called for
> our window. And calling UnregisterTopLevelWindow isn't enough.
>
> I think I found what exactly goes wrong.
> Because RegisterTopLevelWindow ends up being called for this window,
> nsAppStartup receive a xul-window-registered event and call
> EnterLastWindowClosingSurvivalArea:
> http://mxr.mozilla.org/mozilla-central/source/xpfe/appshell/src/
> nsAppShellService.cpp#594
> http://mxr.mozilla.org/mozilla-central/source/toolkit/components/startup/
> nsAppStartup.cpp#642
>
> But as we never call close on our hidden window, *AND SHOULD NOT HAVE TO DO
> IT*.
> (gozala: I'll repeat again, but we shouldn't not have to do anything special
> to make firefox quit. no listening to any quit-application-requested or
> xul-window-destroyed.)
> The sibling xul-window-destroyed is never dispatched.
> http://mxr.mozilla.org/mozilla-central/source/xpfe/appshell/src/nsXULWindow.
> cpp#522
>
> So that we can workaround this by dispatching this event.
> But we really shouldn't. We should either fix bug 565388 or expose
> nsAppShellService::JustCreateTopWindow (or a scriptable equivalent) in order
> to be able to implement nsAppShellService::CreateHiddenWindowHelper in JS.
Updated•12 years ago
|
Component: Shell Integration → Startup and Profile System
Product: Firefox → Toolkit
Updated•12 years ago
|
Priority: -- → P5
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•