mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1125364 - Check to make sure content window isn't null after paring document (Android patch). r=mfinkle
This commit is contained in:
parent
a4cb351d42
commit
25a5adf89e
@ -66,12 +66,15 @@ let AboutReaderListener = {
|
||||
sendAsyncMessage("Reader:UpdateReaderButton", { isArticle: false });
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user