Closed
Bug 298292
Opened 19 years ago
Closed 8 years ago
nsIAppStartup Quit restart flag does not always work
Categories
(Toolkit :: Startup and Profile System, defect)
Toolkit
Startup and Profile System
Tracking
()
RESOLVED
INCOMPLETE
People
(Reporter: bugs, Unassigned)
Details
Attachments
(1 file, 1 obsolete file)
1.12 KB,
patch
|
Details | Diff | Splinter Review |
The Quit function call with the eRestart flag does not always work since mShuttingDown is set multiple times during the shutdown process, which causes mRestart on nsAppStartup to be reset when other callers call Quit without the eRestart flag after the initial caller. A simple fix is to make mRestart settable only once and never again. (See attachment) A fix for pondering is making sure mShutdown is only ever set once the appshell really has exited, and not multiple times.
Reporter | ||
Comment 1•19 years ago
|
||
Attachment #186885 -
Flags: first-review?(darin)
Comment 2•19 years ago
|
||
bsmedberg: could you please comment on this patch. the other solution is to only set mShuttingDown to FALSE once nsIAppShell.run has returned. that seems like a better fix to me, but i'm worried about regressing something. what do you think?
Comment 3•19 years ago
|
||
Here's the alternative (more risky) patch. I haven't tested this yet, but I think it should work ;-)
Attachment #187058 -
Flags: first-review?(benjamin)
Comment 4•19 years ago
|
||
Comment on attachment 187058 [details] [diff] [review] v2 patch r=me if it works ;-)
Attachment #187058 -
Flags: first-review?(benjamin) → first-review+
Comment 5•19 years ago
|
||
Comment on attachment 187058 [details] [diff] [review] v2 patch So, this patch does not work. The problem is that in the eAttemptQuit case, we clear mShuttingDown at the bottom of nsAppStartup::Quit. So, the next call to Quit (which seems to be generated by XUL windows closing), ends up resetting the value of mRestart. I don't know if it would be best to go with the original patch or to invent a better way to flag the application for restart. It seems odd to me that subsequent calls to Quit would not trump earlier calls, so the first patch still feels hackish to me. Thoughts?
Attachment #187058 -
Attachment is obsolete: true
Comment 6•19 years ago
|
||
For reference, the first patch went in accidentally, but I think that's ok for now. I want to come up with a better solution shortly. I think it might make sense to just define a new attribute on nsIAppStartup to schedule a restart, thus separating that setting from the manner in which the application is actually shutdown.
Comment 7•19 years ago
|
||
See also bug 310076, bug 310378.
Updated•17 years ago
|
Assignee: bugs → nobody
QA Contact: nobody → xre.startup
Attachment #186885 -
Flags: first-review?(darin.moz) → review?(darin.moz)
Component: XRE Startup → Startup and Profile System
QA Contact: xre.startup → startup
Updated•8 years ago
|
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•