зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1506271 - BrowserGlue._setSyncAutoconnectDelay() now checks win.gBrowser before using it. r=MattN
Differential Revision: https://phabricator.services.mozilla.com/D11817 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
80827187fc
Коммит
d984ada10e
|
@ -634,6 +634,11 @@ BrowserGlue.prototype = {
|
|||
const MAX_DELAY = 300;
|
||||
let delay = 3;
|
||||
for (let win of Services.wm.getEnumerator("navigator:browser")) {
|
||||
// browser windows without a gBrowser almost certainly means we are
|
||||
// shutting down, so instead of just ignoring that window we abort.
|
||||
if (win.closed || !win.gBrowser) {
|
||||
return;
|
||||
}
|
||||
delay += win.gBrowser.tabs.length;
|
||||
}
|
||||
delay = delay <= MAX_DELAY ? delay : MAX_DELAY;
|
||||
|
|
Загрузка…
Ссылка в новой задаче