Bug 970937 - [JavaScript Error: 'parentDocShell is null'] in LayoutHelpers.jsm. r=paul
authorVivien Nicolas <vnicolas@mozilla.com>
Sat, 15 Feb 2014 01:45:45 +0100
changeset 168888 c566eedcc375d25cb55fbc89af19815d81d9a3e8
parent 168887 fc09cccba55cf5e5a72539b85cef25695cb9def8
child 168889 e75276f3bcc00ed7b8386ab02eabad02909d6ee9
push id39823
push uservnicolas@mozilla.com
push dateSat, 15 Feb 2014 00:46:44 +0000
treeherdermozilla-inbound@a23dfaabbe18 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspaul
bugs970937
milestone30.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 970937 - [JavaScript Error: 'parentDocShell is null'] in LayoutHelpers.jsm. r=paul
toolkit/devtools/LayoutHelpers.jsm
--- a/toolkit/devtools/LayoutHelpers.jsm
+++ b/toolkit/devtools/LayoutHelpers.jsm
@@ -369,17 +369,17 @@ LayoutHelpers.prototype = {
     }
 
     let docShell = win.QueryInterface(Ci.nsIInterfaceRequestor)
                    .getInterface(Ci.nsIWebNavigation)
                    .QueryInterface(Ci.nsIDocShell);
 
     if (docShell.isBrowserOrApp) {
       let parentDocShell = docShell.getSameTypeParentIgnoreBrowserAndAppBoundaries();
-      return parentDocShell.contentViewer.DOMDocument.defaultView;
+      return parentDocShell ? parentDocShell.contentViewer.DOMDocument.defaultView : null;
     } else {
       return win.parent;
     }
   },
 
   /**
    * like win.frameElement, but goes through mozbrowsers and mozapps iframes.
    *