зеркало из https://github.com/mozilla/pjs.git
Bug 342885: Session restore launches even when I haven't crashed, patch by Simon B�nzli <zeniko@gmail.com>, r=me, sr=neil
This commit is contained in:
Родитель
ec6531da50
Коммит
0aca25376c
|
@ -96,6 +96,7 @@ const DEFAULT_RESUME_FROM_CRASH = true;
|
|||
const OBSERVING = [
|
||||
"domwindowopened", "domwindowclosed",
|
||||
"quit-application-requested", "quit-application-granted",
|
||||
"quit-application-roughly", // XXXzeniko work-around for bug 333907
|
||||
"quit-application", "browser:purge-session-history"
|
||||
];
|
||||
|
||||
|
@ -295,6 +296,7 @@ SessionStoreService.prototype = {
|
|||
this._loadState = STATE_QUITTING;
|
||||
break;
|
||||
case "quit-application":
|
||||
case "quit-application-roughly":
|
||||
if (aData == "restart")
|
||||
this._prefBranch.setBoolPref("sessionstore.resume_session_once", true);
|
||||
this._loadState = STATE_QUITTING; // just to be sure
|
||||
|
|
|
@ -5262,6 +5262,16 @@ PRBool nsWindow::ProcessMessage(UINT msg, WPARAM wParam, LPARAM lParam, LRESULT
|
|||
break;
|
||||
#endif
|
||||
|
||||
case WM_ENDSESSION:
|
||||
// XXXzeniko allow components to deal with a rough shutdown as long as there's no
|
||||
// clean fix for bug 333907
|
||||
if (wParam) {
|
||||
nsCOMPtr<nsIObserverService> observerService
|
||||
= do_GetService("@mozilla.org/observer-service;1");
|
||||
if (observerService)
|
||||
observerService->NotifyObservers(nsnull, "quit-application-roughly", nsnull);
|
||||
}
|
||||
break;
|
||||
|
||||
#ifdef WINCE
|
||||
case WM_HIBERNATE:
|
||||
|
|
Загрузка…
Ссылка в новой задаче