Skip to content

Commit

Permalink
fix[devtools/extension]: added a workaround for proxy content script …
Browse files Browse the repository at this point in the history
…injection in firefox (#27375)

Changes:
1. [Firefox-only] For some reason, Firefox might try to inject
dynamically registered content script in pages like `about:blank`. I
couldn't find a way to change this behaviour, `about:` is not a valid
scheme, so we can't exclude it and `match_about_blank` flag is not
supported in `chrome.scripting.registerContentScripts`.
2. While navigating the history in Firefox, some content scripts might
not be re-injected and still be alive. To handle this, we are now
patching `window` with `__REACT_DEVTOOLS_PROXY_INJECTED__` flag, to make
sure that proxy is injected and only once. This flag is cleared on
`pagehide` event.

DiffTrain build for commit f9d75e3.
  • Loading branch information
hoxyq committed Sep 22, 2023
1 parent 692e88a commit 04fa1ae
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23998,7 +23998,7 @@ function createFiberRoot(
return root;
}

var ReactVersion = "18.3.0-canary-9ba1bbd65-20230922";
var ReactVersion = "18.3.0-canary-f9d75e32b-20230922";

// Might add PROFILE later.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8620,7 +8620,7 @@ var devToolsConfig$jscomp$inline_1028 = {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 0,
version: "18.3.0-canary-9ba1bbd65-20230922",
version: "18.3.0-canary-f9d75e32b-20230922",
rendererPackageName: "react-test-renderer"
};
var internals$jscomp$inline_1227 = {
Expand Down Expand Up @@ -8651,7 +8651,7 @@ var internals$jscomp$inline_1227 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-canary-9ba1bbd65-20230922"
reconcilerVersion: "18.3.0-canary-f9d75e32b-20230922"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1228 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9046,7 +9046,7 @@ var devToolsConfig$jscomp$inline_1070 = {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 0,
version: "18.3.0-canary-9ba1bbd65-20230922",
version: "18.3.0-canary-f9d75e32b-20230922",
rendererPackageName: "react-test-renderer"
};
var internals$jscomp$inline_1268 = {
Expand Down Expand Up @@ -9077,7 +9077,7 @@ var internals$jscomp$inline_1268 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-canary-9ba1bbd65-20230922"
reconcilerVersion: "18.3.0-canary-f9d75e32b-20230922"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1269 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ if (
}
"use strict";

var ReactVersion = "18.3.0-canary-9ba1bbd65-20230922";
var ReactVersion = "18.3.0-canary-f9d75e32b-20230922";

// ATTENTION
// When adding new symbols to this file,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -616,4 +616,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactCurrentDispatcher.current.useTransition();
};
exports.version = "18.3.0-canary-9ba1bbd65-20230922";
exports.version = "18.3.0-canary-f9d75e32b-20230922";
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactCurrentDispatcher.current.useTransition();
};
exports.version = "18.3.0-canary-9ba1bbd65-20230922";
exports.version = "18.3.0-canary-f9d75e32b-20230922";

/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
if (
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9ba1bbd6568f170dfbc31e05d7ee88e3d9101523
f9d75e32ba85b3c6a2a5d20fa27ba7e23d5529b2

0 comments on commit 04fa1ae

Please sign in to comment.