Skip to content

Commit

Permalink
fix[devtools]: allow element updates polling only if bridge is alive (#…
Browse files Browse the repository at this point in the history
…27067)

When some element is inspected in DevTools, we have a polling which
updates the data for this element.
Sometimes when service worker dies or bridge is getting shutdown, we
continue to poll this data and will spam with the same "timed out
error".

<img width="1728" alt="Screenshot 2023-07-28 at 17 39 23"
src="https://github.com/facebook/react/assets/28902667/220c4504-1ccc-4e87-9d78-bfff8b708230">

These changes add an explicit check that polling is allowed only while
bridge is alive.

DiffTrain build for commit 41e9c17.
  • Loading branch information
hoxyq committed Aug 29, 2023
1 parent 79eaef5 commit 315042d
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 @@ -23986,7 +23986,7 @@ function createFiberRoot(
return root;
}

var ReactVersion = "18.3.0-canary-456d153bb-20230828";
var ReactVersion = "18.3.0-canary-41e9c17a6-20230829";

// Might add PROFILE later.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8612,7 +8612,7 @@ var devToolsConfig$jscomp$inline_1027 = {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 0,
version: "18.3.0-canary-456d153bb-20230828",
version: "18.3.0-canary-41e9c17a6-20230829",
rendererPackageName: "react-test-renderer"
};
var internals$jscomp$inline_1226 = {
Expand Down Expand Up @@ -8643,7 +8643,7 @@ var internals$jscomp$inline_1226 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-canary-456d153bb-20230828"
reconcilerVersion: "18.3.0-canary-41e9c17a6-20230829"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1227 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9038,7 +9038,7 @@ var devToolsConfig$jscomp$inline_1069 = {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 0,
version: "18.3.0-canary-456d153bb-20230828",
version: "18.3.0-canary-41e9c17a6-20230829",
rendererPackageName: "react-test-renderer"
};
var internals$jscomp$inline_1267 = {
Expand Down Expand Up @@ -9069,7 +9069,7 @@ var internals$jscomp$inline_1267 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-canary-456d153bb-20230828"
reconcilerVersion: "18.3.0-canary-41e9c17a6-20230829"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1268 = __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-456d153bb-20230828";
var ReactVersion = "18.3.0-canary-41e9c17a6-20230829";

// 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-456d153bb-20230828";
exports.version = "18.3.0-canary-41e9c17a6-20230829";
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-456d153bb-20230828";
exports.version = "18.3.0-canary-41e9c17a6-20230829";

/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
if (
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
456d153bb582798effa76c09bec2405ab2e392cf
41e9c17a69f819f20a29823a0acf18456c5ef4d2

0 comments on commit 315042d

Please sign in to comment.