Bug 947895 - [e10s] Null check browser.docShell in context-menu Open in new tab. r=gavin
authorTom Schuster <evilpies@gmail.com>
Mon, 24 Feb 2014 23:10:18 +0100
changeset 170629 a712e7b9892dd0eca5f4ab064865ed3af1130a0e
parent 170628 292b561440076f6a6463ddd7f92e4932d2d6c17d
child 170630 2f0a52a545af24bcbb89219120517418cfc03356
push id270
push userpvanderbeken@mozilla.com
push dateThu, 06 Mar 2014 09:24:21 +0000
reviewersgavin
bugs947895
milestone30.0a1
Bug 947895 - [e10s] Null check browser.docShell in context-menu Open in new tab. r=gavin
browser/base/content/nsContextMenu.js
--- a/browser/base/content/nsContextMenu.js
+++ b/browser/base/content/nsContextMenu.js
@@ -844,17 +844,17 @@ nsContextMenu.prototype = {
     urlSecurityCheck(this.linkURL, this._unremotePrincipal(doc.nodePrincipal));
     var referrerURI = doc.documentURIObject;
 
     // if the mixedContentChannel is present and the referring URI passes
     // a same origin check with the target URI, we can preserve the users
     // decision of disabling MCB on a page for it's child tabs.
     var persistDisableMCBInChildTab = false;
 
-    if (this.browser.docShell.mixedContentChannel) {
+    if (this.browser.docShell && this.browser.docShell.mixedContentChannel) {
       const sm = Services.scriptSecurityManager;
       try {
         var targetURI = this.linkURI;
         sm.checkSameOriginURI(referrerURI, targetURI, false);
         persistDisableMCBInChildTab = true;
       }
       catch (e) { }
     }