Bug 750159 - Sometimes we get 'browser is null' errors in onLocationChange so remove the need for the browser r=mbrubeck

This commit is contained in:
Mark Finkle 2012-04-30 16:17:31 -04:00
Родитель f8175383ec
Коммит ef1fcb3e2c
1 изменённых файлов: 3 добавлений и 8 удалений

Просмотреть файл

@ -2208,15 +2208,10 @@ Tab.prototype = {
if (contentWin != contentWin.top)
return;
let browser = BrowserApp.getBrowserForWindow(contentWin);
let uri = browser.currentURI.spec;
let documentURI = "";
let contentType = "";
let uri = aLocationURI.spec;
let documentURI = contentWin.document.documentURIObject.spec;
let contentType = contentWin.document.contentType;
let sameDocument = (aFlags & Ci.nsIWebProgressListener.LOCATION_CHANGE_SAME_DOCUMENT) != 0;
if (browser.contentDocument) {
documentURI = browser.contentDocument.documentURIObject.spec;
contentType = browser.contentDocument.contentType;
}
// Reset state of click-to-play plugin notifications.
this.clickToPlayPluginDoorhangerShown = false;