Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b82f45e

Browse files
committed
refactor: refactored devtools browser extension scripts to improve port management and service worker lifetime (#27215)
Fixes #27119, #27185. Fixed: - React DevTools now works as expected when user performs in-tab navigation, previously it was just stuck. https://github.com/facebook/react/assets/28902667/b11c5f84-7155-47a5-8b5a-7e90baca5347 - When user closes browser DevTools panel, we now do some cleanup to disconnect ports and emit shutdown event for bridge. This should fix the issue with registering duplicated fibers with the same id in Store. Changed: - We reconnect proxy port once in 25 seconds, in order to [keep service worker alive](https://developer.chrome.com/docs/extensions/whatsnew/#m110-sw-idle). - Instead of unregistering dynamically injected content scripts, wen now get list of already registered scripts and filter them out from scripts that we want to inject again, see dynamicallyInjectContentScripts.js. - Split `main.js` and `background.js` into multiple files. Tested on Chromium and Firefox browsers. DiffTrain build for commit 8fbd307.
1 parent 1d32512 commit b82f45e

File tree

7 files changed

+9
-9
lines changed

7 files changed

+9
-9
lines changed

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23986,7 +23986,7 @@ function createFiberRoot(
2398623986
return root;
2398723987
}
2398823988

23989-
var ReactVersion = "18.3.0-canary-f47956239-20230829";
23989+
var ReactVersion = "18.3.0-canary-8fbd30794-20230829";
2399023990

2399123991
// Might add PROFILE later.
2399223992

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-prod.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8612,7 +8612,7 @@ var devToolsConfig$jscomp$inline_1027 = {
86128612
throw Error("TestRenderer does not support findFiberByHostInstance()");
86138613
},
86148614
bundleType: 0,
8615-
version: "18.3.0-canary-f47956239-20230829",
8615+
version: "18.3.0-canary-8fbd30794-20230829",
86168616
rendererPackageName: "react-test-renderer"
86178617
};
86188618
var internals$jscomp$inline_1226 = {
@@ -8643,7 +8643,7 @@ var internals$jscomp$inline_1226 = {
86438643
scheduleRoot: null,
86448644
setRefreshHandler: null,
86458645
getCurrentFiber: null,
8646-
reconcilerVersion: "18.3.0-canary-f47956239-20230829"
8646+
reconcilerVersion: "18.3.0-canary-8fbd30794-20230829"
86478647
};
86488648
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
86498649
var hook$jscomp$inline_1227 = __REACT_DEVTOOLS_GLOBAL_HOOK__;

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-profiling.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9038,7 +9038,7 @@ var devToolsConfig$jscomp$inline_1069 = {
90389038
throw Error("TestRenderer does not support findFiberByHostInstance()");
90399039
},
90409040
bundleType: 0,
9041-
version: "18.3.0-canary-f47956239-20230829",
9041+
version: "18.3.0-canary-8fbd30794-20230829",
90429042
rendererPackageName: "react-test-renderer"
90439043
};
90449044
var internals$jscomp$inline_1267 = {
@@ -9069,7 +9069,7 @@ var internals$jscomp$inline_1267 = {
90699069
scheduleRoot: null,
90709070
setRefreshHandler: null,
90719071
getCurrentFiber: null,
9072-
reconcilerVersion: "18.3.0-canary-f47956239-20230829"
9072+
reconcilerVersion: "18.3.0-canary-8fbd30794-20230829"
90739073
};
90749074
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
90759075
var hook$jscomp$inline_1268 = __REACT_DEVTOOLS_GLOBAL_HOOK__;

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-dev.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ if (
2727
}
2828
"use strict";
2929

30-
var ReactVersion = "18.3.0-canary-f47956239-20230829";
30+
var ReactVersion = "18.3.0-canary-8fbd30794-20230829";
3131

3232
// ATTENTION
3333
// When adding new symbols to this file,

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-prod.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -616,4 +616,4 @@ exports.useSyncExternalStore = function (
616616
exports.useTransition = function () {
617617
return ReactCurrentDispatcher.current.useTransition();
618618
};
619-
exports.version = "18.3.0-canary-f47956239-20230829";
619+
exports.version = "18.3.0-canary-8fbd30794-20230829";

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-profiling.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,7 @@ exports.useSyncExternalStore = function (
619619
exports.useTransition = function () {
620620
return ReactCurrentDispatcher.current.useTransition();
621621
};
622-
exports.version = "18.3.0-canary-f47956239-20230829";
622+
exports.version = "18.3.0-canary-8fbd30794-20230829";
623623

624624
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
625625
if (
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
f47956239f6892a1e805af1fc3f1b2fb0f66beca
1+
8fbd3079425eaff85ec1b52b0eefecdd44ba7289

0 commit comments

Comments
 (0)