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 273206 432a4401d3a8380c15641250e3664605a9725ef1
parent 273205 c982ce92229b38103507f0257f3bc71ea6ccef28
child 273207 84a280a8e16af2624a8cf9dd438dad9179f51dbc
push id863
push userraliiev@mozilla.com
push dateMon, 03 Aug 2015 13:22:43 +0000
treeherdermozilla-release@f6321b14228d [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