You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor[devtools/extension]: more stable element updates polling to avoid timed out errors (#27357)
Some context:
- When user selects an element in tree inspector, we display current
state of the component. In order to display really current state, we
start polling the backend to get available updates for the element.
Previously:
- Straight-forward sending an event to get element updates each second.
Potential race condition is not handled in any form.
- If user navigates from the page, timeout wouldn't be cleared and we
would potentially throw "Timed out ..." error.
- Bridge disconnection is not handled in any form, if it was shut down,
we could spam with "Timed out ..." errors.
With these changes:
- Requests are now chained, so there can be a single request at a time.
- Handling both navigation and shut down events.
This should reduce the number of "Timed out ..." errors that we see in
our logs for the extension. Other surfaces will also benefit from it,
but not to the full extent, as long as they utilize
"resumeElementPolling" and "pauseElementPolling" events.
Tested this on Chrome, running React DevTools on multiple tabs,
explicitly checked the case when service worker is in idle state and we
return back to the tab.
DiffTrain build for commit 2eed132.
Copy file name to clipboardExpand all lines: compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -23994,7 +23994,7 @@ function createFiberRoot(
23994
23994
return root;
23995
23995
}
23996
23996
23997
-
var ReactVersion = "18.3.0-canary-bb1d8d166-20230911";
23997
+
var ReactVersion = "18.3.0-canary-2eed13284-20230912";
Copy file name to clipboardExpand all lines: compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-prod.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -8617,7 +8617,7 @@ var devToolsConfig$jscomp$inline_1027 = {
8617
8617
throwError("TestRenderer does not support findFiberByHostInstance()");
8618
8618
},
8619
8619
bundleType: 0,
8620
-
version: "18.3.0-canary-bb1d8d166-20230911",
8620
+
version: "18.3.0-canary-2eed13284-20230912",
8621
8621
rendererPackageName: "react-test-renderer"
8622
8622
};
8623
8623
varinternals$jscomp$inline_1226={
@@ -8648,7 +8648,7 @@ var internals$jscomp$inline_1226 = {
Copy file name to clipboardExpand all lines: compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-profiling.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -9043,7 +9043,7 @@ var devToolsConfig$jscomp$inline_1069 = {
9043
9043
throwError("TestRenderer does not support findFiberByHostInstance()");
9044
9044
},
9045
9045
bundleType: 0,
9046
-
version: "18.3.0-canary-bb1d8d166-20230911",
9046
+
version: "18.3.0-canary-2eed13284-20230912",
9047
9047
rendererPackageName: "react-test-renderer"
9048
9048
};
9049
9049
varinternals$jscomp$inline_1267={
@@ -9074,7 +9074,7 @@ var internals$jscomp$inline_1267 = {
0 commit comments