Bug 1410921 - Fix netmonitor and webconsole URLs in react-dom monkey patch. r=? draft
authorAlexandre Poirot <poirot.alex@gmail.com>
Mon, 23 Oct 2017 09:03:11 -0700
changeset 684775 57ae222110fe8a3879e993775f279d958adb88e3
parent 684511 ce1a86d3b4db161c95d1147676bbed839d7a4732
child 684776 aee978783731da3eef04e3792f5b0a8de7dccc81
push id85726
push userbmo:poirot.alex@gmail.com
push dateMon, 23 Oct 2017 16:07:05 +0000
bugs1410921
milestone58.0a1
Bug 1410921 - Fix netmonitor and webconsole URLs in react-dom monkey patch. r=? MozReview-Commit-ID: D2BcZE62W5v
devtools/client/shared/vendor/REACT_UPGRADING.md
devtools/client/shared/vendor/react-dom.js
--- a/devtools/client/shared/vendor/REACT_UPGRADING.md
+++ b/devtools/client/shared/vendor/REACT_UPGRADING.md
@@ -205,18 +205,18 @@ Into this:
   * By design, these XUL frames can still talk to each other, while in a normal HTML
   * situation, they would not be able to. The events from the XUL iframe propagate to the
   * parent document as well. This leads to the React event system incorrectly dispatching
   * TWO SyntheticEvents for for every ONE action.
   *
   * The fix here is trick React into thinking that the owning document for every node in
   * a XUL iframe to be the toolbox.xul. This is done by creating a Proxy object that
   * captures any usage of HTMLElement.ownerDocument, and then passing in the toolbox.xul
-  * document rather than (for example) the netmonitor.xul document. React will then hook
-  * up the event system correctly on the top level controlling document.
+  * document rather than (for example) the netmonitor/index.html document. React will
+  * then hook up the event system correctly on the top level controlling document.
   *
   * @return {object} The proxied and monkey patched ReactDOM
   */
 function monkeyPatchReactDOM(ReactDOM) {
   // This is the actual monkey patched function.
   const reactDomRender = monkeyPatchRender(ReactDOM);
 
   // Proxied method calls might need to be bound, but do this lazily with caching.
@@ -301,18 +301,18 @@ function monkeyPatchRender(ReactDOM) {
 function getToolboxDocIfXulOnly(node) {
   // 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";
+  const netMonitorUrl = "chrome://devtools/content/netmonitor/index.html";
+  const webConsoleUrl = "chrome://devtools/content/webconsole/webconsole.html";
 
   while (doc instanceof XULDocument ||
           doc.location.href === inspectorUrl ||
           doc.location.href === netMonitorUrl ||
           doc.location.href === webConsoleUrl) {
     const {frameElement} = doc.defaultView;
 
     if (!frameElement) {
--- a/devtools/client/shared/vendor/react-dom.js
+++ b/devtools/client/shared/vendor/react-dom.js
@@ -5577,18 +5577,18 @@ if ("production" !== 'production') {
   function getToolboxDocIfXulOnly(node) {
     // 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";
+    const netMonitorUrl = "chrome://devtools/content/netmonitor/index.html";
+    const webConsoleUrl = "chrome://devtools/content/webconsole/webconsole.html";
 
     while (doc instanceof XULDocument ||
             doc.location.href === inspectorUrl ||
             doc.location.href === netMonitorUrl ||
             doc.location.href === webConsoleUrl) {
       const {frameElement} = doc.defaultView;
 
       if (!frameElement) {