From d0c866971fa7537a8a1af32b460c497a1a65341c Mon Sep 17 00:00:00 2001 From: Matt Brubeck Date: Wed, 14 Dec 2011 16:36:29 -0500 Subject: [PATCH] Bug 710578 - Pages without contentDocument cause JSON exception in handleLocationChange [r=mfinkle a=javascript] --- mobile/android/chrome/content/browser.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mobile/android/chrome/content/browser.js b/mobile/android/chrome/content/browser.js index a1291efc2944..309d82cebb0c 100644 --- a/mobile/android/chrome/content/browser.js +++ b/mobile/android/chrome/content/browser.js @@ -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: {