Bug 710578 - Pages without contentDocument cause JSON exception in handleLocationChange [r=mfinkle a=javascript]

This commit is contained in:
Matt Brubeck 2011-12-14 16:36:29 -05:00
parent 8c9f1415d4
commit d0c866971f

View File

@ -1397,8 +1397,12 @@ Tab.prototype = {
let browser = BrowserApp.getBrowserForWindow(contentWin);
let uri = browser.currentURI.spec;
let documentURI = browser.contentDocument.documentURIObject.spec;
let contentType = browser.contentDocument.contentType;
let documentURI = "";
let contentType = "";
if (browser.contentDocument) {
documentURI = browser.contentDocument.documentURIObject.spec;
contentType = browser.contentDocument.contentType;
}
let message = {
gecko: {