Closed Bug 986935 Opened 11 years ago Closed 11 years ago

Restore from crash page is blank if default client dialog is open

Categories

(SeaMonkey :: Session Restore, defect)

SeaMonkey 2.29 Branch
defect
Not set
normal

Tracking

(seamonkey2.30?, seamonkey2.31?, seamonkey2.32 fixed)

RESOLVED FIXED
seamonkey2.32
Tracking Status
seamonkey2.30 ? ---
seamonkey2.31 ? ---
seamonkey2.32 --- fixed

People

(Reporter: neil, Assigned: neil)

Details

Attachments

(2 files)

Steps to reproduce problem: 1. Find page that crashes in SeaMonkey 2. Restart SeaMonkey to find that it still crashes 3. Start a debug build of SeaMonkey to troubleshoot At this point the debug build might throw up a default client dialog at the same time that you get the restore from crash page. Unfortunately the default client dialog is modal and this causes events to get suppressed on the owner, i.e. the browser window. One of these events is the load event for the about:sessionrestore page which therefore cannot find the session to restore. As a workaround, having dismissed the default client dialog you can click reload and the about:sessionrestore page will have its session restored and will populate itself.
Attached patch WorkaroundSplinter Review
This version works around the problem by adding the load event listener before broadcasting the window restored notification.
By dispatching the original notification this allows control to return and the event listeners to be added before the default client dialog is opened. While I was there I switched everything that was using zero timeouts to dispatched events instead. While I was there I switched everything that was using _this to bind instead.
Attachment #8395429 - Flags: feedback?(philip.chee)
Comment on attachment 8395429 [details] [diff] [review] With lots of bind and dispatch This works for me. > -XPCOMUtils.defineLazyServiceGetter(this, "gScreenManager", > +XPCOMUtils.defineLazyServiceGetter(this, "gScreenManager", I'm not sure what this is doing?
Attachment #8395429 - Flags: feedback?(philip.chee) → feedback+
(In reply to Philip Chee from comment #3) > > -XPCOMUtils.defineLazyServiceGetter(this, "gScreenManager", > > +XPCOMUtils.defineLazyServiceGetter(this, "gScreenManager", > I'm not sure what this is doing? DOS line ending...
Attachment #8395429 - Flags: review?(iann_bugzilla)
Comment on attachment 8395429 [details] [diff] [review] With lots of bind and dispatch >+++ b/suite/common/src/nsSessionStore.js > // give the tabbrowsers a chance to clear their histories first > var win = this._getMostRecentBrowserWindow(); > if (win) Are these two lines still needed? Is the comment still correct? >- win.setTimeout(function() { _this.saveState(true); }, 0); >+ Services.tm.mainThread.dispatch(this.saveState.bind(this, true), >+ Components.interfaces.nsIThread.DISPATCH_NORMAL); > else if (this._loadState == STATE_RUNNING) > this.saveState(true); > break; r=me with that addressed.
Attachment #8395429 - Flags: review?(iann_bugzilla) → review+
(In reply to Ian Neal from comment #5) > (From update of attachment 8395429 [details] [diff] [review]) > > // give the tabbrowsers a chance to clear their histories first > > var win = this._getMostRecentBrowserWindow(); > > if (win) > Are these two lines still needed? Is the comment still correct? The comment is correct, but the temporary variable is no longer necessary; the code could be simplified to if (this._getMostRecentBrowserWindow()) as we don't need to save the state if there is no browser window to save.
Pushed to comm-central: https://hg.mozilla.org/comm-central/rev/335dea6bd178 a=Callek for checkin to a CLOSED TREE Neil does this need to be backported to 2.31? 2.30?
Status: NEW → RESOLVED
Closed: 11 years ago
Flags: needinfo?(neil)
Resolution: --- → FIXED
Target Milestone: --- → seamonkey2.32
Version: unspecified → SeaMonkey 2.29 Branch
I don't know, it's a bit of an edge case, but feel free to request approval.
Assignee: nobody → neil
Flags: needinfo?(neil)
(In reply to neil@parkwaycc.co.uk from comment #8) > I don't know, it's a bit of an edge case, but feel free to request approval. In that case I say let it ride the trains.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: