Bug 1266724, add null check of defaultView, r=neil
authorAkshay Jain
Fri, 27 May 2016 09:19:53 -0400
changeset 340351 74724ded165f579d12fe6bacf49e08c4f27e1c87
parent 340350 cbb4a840f81ed3e560d6395f61ad15f3a7c01e7e
child 340352 4fbc77b48fd9042cf94d09ec8c8c0ed2f9ab069d
push id1183
push userraliiev@mozilla.com
push dateMon, 05 Sep 2016 20:01:49 +0000
treeherdermozilla-release@3148731bed45 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersneil
bugs1266724
milestone49.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 1266724, add null check of defaultView, r=neil
dom/base/contentAreaDropListener.js
--- a/dom/base/contentAreaDropListener.js
+++ b/dom/base/contentAreaDropListener.js
@@ -115,16 +115,18 @@ ContentAreaDropListener.prototype =
     let sourceDocument = sourceNode.ownerDocument;
     let eventDocument = aEvent.originalTarget.ownerDocument;
     if (sourceDocument == eventDocument)
       return false;
 
     // also check for nodes in other child or sibling frames by checking
     // if both have the same top window.
     if (sourceDocument && eventDocument) {
+      if (sourceDocument.defaultView == null)
+        return true;
       let sourceRoot = sourceDocument.defaultView.top;
       if (sourceRoot && sourceRoot == eventDocument.defaultView.top)
         return false;
     }
 
     return true;
   },