Closed Bug 10321 Opened 25 years ago Closed 25 years ago

Using the Exit menu causes Shutdown to get called twice.

Categories

(SeaMonkey :: UI Design, defect, P2)

x86
Windows NT
defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: scottputterman, Assigned: davidm)

Details

If you use the Exit menu to quit Messenger, every nsIAppShellComponent's
Shutdown gets called twice.  This is because the implementation of Exit and main
call nsAppShellService::Shutdown.  What ends up happening is that the component
gets destroyed the first time and then gets recreated and destroyed again the
second time.  It seems wasteful if it can be avoided.

I've cc'd Steve and Paul because right now it looks like the XUL Overlay version
of Exit calls EditShell::Exit.  It seems stranger to be using the Editor's
implementation of Exit to shutdown Messenger, for example (even if at the moment
they would do the same thing).  I wonder if we need some other version of Exit?
cc'ing Simon.  Simon, please work with Paul, Don, Scott to make this right.  Is
this a mail-specific problem, or do we have the same problem in ender itself?
Bill Law is working on the exit process, so should probably figure out what the
best thing is here.
This is not just a Messenger problem.  It's everywhere.  I just used Messenger
as an example because that's what I was testing.  I tried it from the Editor and
the components get Shutdown twice.

I cc'd the editor team because I noticed that your version of Exit is getting
used.  I just didn't think that seemed correct.
The owner of this bug should feel free to modify the globalOverlay.xul in such a

way as to be able to quit from any window in the application.  The current code

was copied from the messenger window's JavaScript.  This code will soon be

executed from the browser window as well.
Assignee: don → law
Priority: P3 → P2
Target Milestone: M10
Bill, how bad is this really?
Status: NEW → ASSIGNED
Assignee: law → davidm
Status: ASSIGNED → NEW
Reassigning to me since I am working on shutdown. This will be real easy to fix.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Fix checked in. Broke shutdown into the Quit ui command and the shutdown cleanup
function. All quiting ( from the UI ) should use the command in globalOverlay.js
QA Contact: beppe → cpratt
Status: RESOLVED → VERIFIED
Can't verify this (developer issue); taking davidm's word for it and marking it
verified.
Product: Core → Mozilla Application Suite
You need to log in before you can comment on or make changes to this bug.