Bug 972723 - Fixed race condition and added a comment in this bug. r=wesj

This commit is contained in:
Gokul Caushik 2014-05-22 18:28:00 +02:00
parent dc4fdecd9b
commit 2fe541095b

View File

@ -3882,9 +3882,12 @@ Tab.prototype = {
// Once document is fully loaded, parse it
Reader.parseDocumentFromTab(this.id, function (article) {
// The loaded page may have changed while we were parsing the document.
// Make sure we've got the current one.
let uri = this.browser.currentURI;
let tabURL = uri.specIgnoringRef;
// Do nothing if there's no article or the page in this tab has
// changed
let tabURL = uri.specIgnoringRef;
if (article == null || (article.url != tabURL)) {
// Don't clear the article for about:reader pages since we want to
// use the article from the previous page