Closed Bug 381386 Opened 17 years ago Closed 16 years ago

New Window via AppleEvent prevents Session Restore from working

Categories

(Firefox :: Session Restore, defect)

x86
macOS
defect
Not set
critical

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: bill+mozilla-bugzilla, Unassigned)

References

Details

(Keywords: dataloss)

Steps to reproduce:
crash/force quit
relaunch
wait for dialog asking if you want to restore session
go to other app, launch URL via Apple Event (e.g. Mail)
new window opens... close window
click Restore Session

Actual Results:
Nothing Happens

Expected Results:
Session Restore happens

If this can't be easily handled at least queue up incoming events until after restore is done or a new session is created.  If that's not possible/feasible/quick then just ignore the event - I'd much rather have to click again that to lose all my session information.
Similar to Windows bug 371031 (although Windows blocks the opening with an apparently unrelated error message) this should get fixed by delaying the Session Restore prompt to the point where the first actual browser window is opened (as proposed in bug 354894) so that we've certainly got a window to restore into.

OTOH we'd still have to make sure that SessionStore queries SessionStartup for every window if there is any session to restore (which we currently only do for the first opened window - which may be too early as this bug shows).
I don't think that this has to do with delaying till there is a browser window open.

I suspect the problem is that when the URL applevent causes a new window to open to display the URL and this window is subsequently closed before the restore button is hit, the successful loading of the URL from the appleevent has caused the store to get flushed/overwritte in the belief that we are no longer recovering from a crash.  

By the time you hit restore, there is nothing to restore.
(In the first sentence, I mean to say that I dont think the solution will lie in delaying till there is a browser window open to restore into, as suggested in Comment #1.)
(In reply to comment #2)
> I don't think that this has to do with delaying till there is a browser window
> open.

Indeed, it's about either not letting other browser windows open while the prompt is shown or about allowing this in a sane way. There's a patch which should fix this issue (in the first way) in bug 381887.
Resolving as WORKSFORME since the Session Restore prompt was removed in bug
448976.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.