зеркало из https://github.com/mozilla/gecko-dev.git
Bug 925983 - Misc javascript error in aboutReader on restart with multiple tabs in readermode, r=lucasr
This commit is contained in:
Родитель
7c74c4095d
Коммит
9deb76cc82
|
@ -3390,8 +3390,16 @@ Tab.prototype = {
|
||||||
this.browser.addEventListener("pagehide", listener, true);
|
this.browser.addEventListener("pagehide", listener, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (docURI.startsWith("about:reader"))
|
if (docURI.startsWith("about:reader")) {
|
||||||
new AboutReader(this.browser.contentDocument, this.browser.contentWindow);
|
// During browser restart / recovery, duplicate "DOMContentLoaded" messages are received here
|
||||||
|
// For the visible tab ... where more than one tab is being reloaded, the inital "DOMContentLoaded"
|
||||||
|
// Message can be received before the document body is available ... so we avoid instantiating an
|
||||||
|
// AboutReader object, expecting that an eventual valid message will follow.
|
||||||
|
let contentDocument = this.browser.contentDocument;
|
||||||
|
if (contentDocument.body) {
|
||||||
|
new AboutReader(contentDocument, this.browser.contentWindow);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче