зеркало из https://github.com/mozilla/gecko-dev.git
Bug 737830 - Default browser check is broken (Error: win is not defined). r=gavin
This commit is contained in:
Родитель
0ab2405fe2
Коммит
892174b848
|
@ -455,13 +455,13 @@ BrowserGlue.prototype = {
|
|||
} catch (e) { }
|
||||
if (shell) {
|
||||
#ifdef DEBUG
|
||||
var shouldCheck = false;
|
||||
let shouldCheck = false;
|
||||
#else
|
||||
var shouldCheck = shell.shouldCheckDefaultBrowser;
|
||||
let shouldCheck = shell.shouldCheckDefaultBrowser;
|
||||
#endif
|
||||
var willRecoverSession = false;
|
||||
let willRecoverSession = false;
|
||||
try {
|
||||
var ss = Cc["@mozilla.org/browser/sessionstartup;1"].
|
||||
let ss = Cc["@mozilla.org/browser/sessionstartup;1"].
|
||||
getService(Ci.nsISessionStartup);
|
||||
willRecoverSession =
|
||||
(ss.sessionType == Ci.nsISessionStartup.RECOVER_SESSION);
|
||||
|
@ -469,6 +469,7 @@ BrowserGlue.prototype = {
|
|||
catch (ex) { /* never mind; suppose SessionStore is broken */ }
|
||||
if (shouldCheck && !shell.isDefaultBrowser(true) && !willRecoverSession) {
|
||||
Services.tm.mainThread.dispatch(function() {
|
||||
var win = this.getMostRecentBrowserWindow();
|
||||
var brandBundle = win.document.getElementById("bundle_brand");
|
||||
var shellBundle = win.document.getElementById("bundle_shell");
|
||||
|
||||
|
@ -486,7 +487,7 @@ BrowserGlue.prototype = {
|
|||
if (rv == 0)
|
||||
shell.setDefaultBrowser(true, false);
|
||||
shell.shouldCheckDefaultBrowser = checkEveryTime.value;
|
||||
}, Ci.nsIThread.DISPATCH_NORMAL);
|
||||
}.bind(this), Ci.nsIThread.DISPATCH_NORMAL);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
Загрузка…
Ссылка в новой задаче