Closed Bug 512728 Opened 15 years ago Closed 15 years ago

Fast startup should allow restarts and cope with non "-faststart" starts

Categories

(Toolkit Graveyard :: XULRunner, defect)

defect
Not set
major

Tracking

(fennec1.0a3-wm+)

VERIFIED FIXED
Tracking Status
fennec 1.0a3-wm+ ---

People

(Reporter: crowderbt, Assigned: crowderbt)

References

Details

Attachments

(1 file, 3 obsolete files)

+++ This bug was initially created as a clone of Bug #512330 +++

The faststartup component does need to listen to quit-application-requested and exitLastWindowClosingSurvivalArea() so that the app can shutdown/restart.  Also, if the faststart component is installed, we assume you always want the faststart behavior.  "-faststart" only means that you don't wish to open the default window on startup, now.  This means that when you close that window, the "daemon" will continue running.
Attached patch better handling of restarts (obsolete) — Splinter Review
Attachment #396756 - Flags: review?(gavin.sharp)
Blocks: 509249
No longer depends on: 512330
Attached patch less dumps (obsolete) — Splinter Review
Attachment #396756 - Attachment is obsolete: true
Attachment #396759 - Flags: review?(gavin.sharp)
Attachment #396756 - Flags: review?(gavin.sharp)
Summary: Fast startup shouldn't show splash screens after automatic restarts → Fast startup should allow restarts and cope with non "-faststart" starts
Comment on attachment 396759 [details] [diff] [review]
less dumps

>diff --git a/toolkit/components/faststart/FastStartup.js b/toolkit/components/faststart/FastStartup.js

>-  this.QueryInterface = XPCOMUtils.generateQI([Ci.nsIObserver]);
>+  this.QueryInterface = XPCOMUtils.generateQI([Ci.nsIObserver, Ci.nsISupportsWeakReference]);

I guess we're relying on nsWindowWatcher::RegisterNotification passing "false"
for aOwnsWeak on its AddObserver calls, here, to avoid being GCed. That was
true before, but with this change it's theoretically possible for that to turn
into a weak ref if someone ends up changing that method in the future. Granted
that's unlikely, but perhaps it would be worth a comment?

"-faststart" is a bit of a misleading parameter name, I think, especially given its new meaning. Can we change it to something clearer? "-hide", maybe?
Attachment #396759 - Flags: review?(gavin.sharp) → review+
Carrying over gavin's r+.  This is what I will land.
Attachment #396759 - Attachment is obsolete: true
Attachment #396786 - Flags: review+
exitBlahBlahSurvivalArea() in quit-app-requested is erroneous, it must happen in quit-app-granted.
Attachment #396786 - Attachment is obsolete: true
Attachment #396794 - Flags: review+
http://hg.mozilla.org/mozilla-central/rev/3a3f9a03e210
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
verfied with 20090827 nightly trunk build of fennec.  As a note, the startup time after the addon triggered reboot is much longer, but it does restart.  It also has the splashscreen during that restart.  Future restarts are fast and as expected.

Great work!
Status: RESOLVED → VERIFIED
Attachment #396794 - Flags: approval1.9.2.1?
Comment on attachment 396794 [details] [diff] [review]
granted, not requested

This has already landed in 192, sorry for missing clearing the flag.
Attachment #396794 - Flags: approval1.9.2.1?
Product: Toolkit → Toolkit Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: