Open Bug 698276 Opened 14 years ago Updated 14 years ago

Port Bug 686065 [Don't clear nsSessionStartup::sessionType after the session startup phase finished]

Categories

(SeaMonkey :: Session Restore, defect)

defect
Not set
normal

Tracking

(Not tracked)

ASSIGNED

People

(Reporter: misak.bugzilla, Assigned: misak.bugzilla)

References

Details

Attachments

(1 file, 2 obsolete files)

Attached patch patch (obsolete) — Splinter Review
From parent bug: For the new Downloads panel, having sessionType available after the session startup phase finished can simplify some of the session restore code.
Attachment #570551 - Flags: review?(neil)
Comment on attachment 570551 [details] [diff] [review] patch >+ if (this._sessionType != Ci.nsISessionStartup.NO_SESSION) >+ Services.obs.removeObserver(this, "browser:purge-session-history"); > this.init(); I don't understand this change; _sessionType defaults to Components.interfaces.nsISessionStartup.NO_SESSION and is only changed by this.init(), which is also where the observer gets added in the first place.
Attachment #570551 - Flags: review?(neil) → review-
Attached patch patch v2 (obsolete) — Splinter Review
Attachment #570551 - Attachment is obsolete: true
Attachment #570810 - Flags: review?(neil)
(In reply to neil@parkwaycc.co.uk from comment #1) > Comment on attachment 570551 [details] [diff] [review] [diff] [details] [review] > patch > > I don't understand this change; _sessionType defaults to > Components.interfaces.nsISessionStartup.NO_SESSION and is only changed by > this.init(), which is also where the observer gets added in the first place. It adds and removes observer if _sessionType changed from default NO_SESSION ?
(In reply to Misak Khachatryan from comment #3) > (In reply to comment #1) > > I don't understand this change; _sessionType defaults to > > Components.interfaces.nsISessionStartup.NO_SESSION and is only changed by > > this.init(), which is also where the observer gets added in the first place. > > It adds and removes observer if _sessionType changed from default NO_SESSION ? But it does it before anyone changes _sessionType...
That(In reply to neil@parkwaycc.co.uk from comment #4) > (In reply to Misak Khachatryan from comment #3) > > (In reply to comment #1) > > > I don't understand this change; _sessionType defaults to > > > Components.interfaces.nsISessionStartup.NO_SESSION and is only changed by > > > this.init(), which is also where the observer gets added in the first place. > > > > It adds and removes observer if _sessionType changed from default NO_SESSION ? > > But it does it before anyone changes _sessionType... That's because I placed it wrong :D . It belongs to "quit-application" case.
Attached patch patch v3Splinter Review
Attachment #570810 - Attachment is obsolete: true
Attachment #570810 - Flags: review?(neil)
Attachment #571014 - Flags: review?(neil)
This still doesn't look right. I'd better ask in bug 686065.
Comment on attachment 571014 [details] [diff] [review] patch v3 OK, so zpao thinks his patch might be wrong. Let's see what he comes up with.
Attachment #571014 - Flags: review?(neil) → review-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: