Bug 1160104 - Fix "chrome://browser/content/tab-content.js, line 558: TypeError: docShell is null" failures r=mconley
authorTim Taubert <ttaubert@mozilla.com>
Thu, 30 Apr 2015 12:06:18 +0200
changeset 241841 432a4401d3a8380c15641250e3664605a9725ef1
parent 241840 c982ce92229b38103507f0257f3bc71ea6ccef28
child 241842 84a280a8e16af2624a8cf9dd438dad9179f51dbc
push id28671
push userryanvm@gmail.com
push dateFri, 01 May 2015 14:27:58 +0000
treeherdermozilla-central@60b269fed8cf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmconley
bugs1160104
milestone40.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1160104 - Fix "chrome://browser/content/tab-content.js, line 558: TypeError: docShell is null" failures r=mconley
browser/base/content/tab-content.js
--- a/browser/base/content/tab-content.js
+++ b/browser/base/content/tab-content.js
@@ -550,17 +550,19 @@ function gKeywordURIFixup(fixupInfo) {
   sendAsyncMessage("Browser:URIFixup", data);
 }
 Services.obs.addObserver(gKeywordURIFixup, "keyword-uri-fixup", false);
 addEventListener("unload", () => {
   Services.obs.removeObserver(gKeywordURIFixup, "keyword-uri-fixup");
 }, false);
 
 addMessageListener("Browser:AppTab", function(message) {
-  docShell.isAppTab = message.data.isAppTab;
+  if (docShell) {
+    docShell.isAppTab = message.data.isAppTab;
+  }
 });
 
 let WebBrowserChrome = {
   onBeforeLinkTraversal: function(originalTarget, linkURI, linkNode, isAppTab) {
     return BrowserUtils.onBeforeLinkTraversal(originalTarget, linkURI, linkNode, isAppTab);
   },
 
   // Check whether this URI should load in the current process