Bug 1326937 - Patch react-dom to avoid double load draft
authorJan Odvarko <odvarko@gmail.com>
Thu, 15 Jun 2017 16:43:47 +0200
changeset 612949 ca1c9d9add4c6443dd6148972cc8965bc1591bd1
parent 612948 e7123e7ccee0ed940afa1ece98200ca389f0572e
child 612950 33bef3a66d60e306d9ee72a95059d8699e5643e1
push id69666
push userjodvarko@mozilla.com
push dateFri, 21 Jul 2017 09:21:19 +0000
bugs1326937
milestone56.0a1
Bug 1326937 - Patch react-dom to avoid double load MozReview-Commit-ID: CEMsI7CvqHS
devtools/client/shared/vendor/react-dom.js
--- a/devtools/client/shared/vendor/react-dom.js
+++ b/devtools/client/shared/vendor/react-dom.js
@@ -146,20 +146,22 @@
     // This execution context doesn't know about XULDocuments, so don't get the toolbox.
     if (typeof XULDocument !== "function") {
       return null;
     }
 
     let doc = node.ownerDocument;
     const inspectorUrl = "chrome://devtools/content/inspector/inspector.xhtml";
     const netMonitorUrl = "chrome://devtools/content/netmonitor/netmonitor.xhtml";
+    const webConsoleUrl = "chrome://devtools/content/webconsole/webconsole.xhtml";
 
     while (doc instanceof XULDocument ||
            doc.location.href === inspectorUrl ||
-           doc.location.href === netMonitorUrl) {
+           doc.location.href === netMonitorUrl ||
+           doc.location.href === webConsoleUrl) {
       const {frameElement} = doc.defaultView;
 
       if (!frameElement) {
         // We're at the root element, and no toolbox was found.
         return null;
       }
 
       doc = frameElement.parentElement.ownerDocument;