Bug 1410921 - Fix netmonitor and webconsole URLs in react-dom monkey patch. r=?
MozReview-Commit-ID: D2BcZE62W5v
--- 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) {