зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1125364 - Check to make sure content window isn't null after paring document. r=jaws
--HG-- extra : rebase_source : ee5750e0543b7c11780cd3872853b61ada801154 extra : histedit_source : 271c8ab4f7944e28c020e665f892f15ae3ead71e
This commit is contained in:
Родитель
23f1a76564
Коммит
8ea9d0a1e7
|
@ -508,12 +508,15 @@ let AboutReaderListener = {
|
|||
}
|
||||
|
||||
ReaderMode.parseDocument(content.document).then(article => {
|
||||
// Do nothing if there is no article, or if the content window has been destroyed.
|
||||
if (article === null || content === null) {
|
||||
return;
|
||||
}
|
||||
|
||||
// The loaded page may have changed while we were parsing the document.
|
||||
// Make sure we've got the current one.
|
||||
let currentURL = Services.io.newURI(content.document.documentURI, null, null).specIgnoringRef;
|
||||
|
||||
// Do nothing if there's no article or the page in this tab has changed.
|
||||
if (article == null || (article.url != currentURL)) {
|
||||
if (article.url !== currentURL) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче