Skip to content

Commit 9c8161b

Browse files
author
Juan
authored
Reapply changes from #22631 (#22645)
1 parent c624dc3 commit 9c8161b

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

packages/react-devtools-extensions/src/backend.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,15 @@ function welcome(event) {
1313
) {
1414
return;
1515
}
16-
const extensionId = event.data.extensionId;
1716

1817
window.removeEventListener('message', welcome);
1918

20-
setup(window.__REACT_DEVTOOLS_GLOBAL_HOOK__, extensionId);
19+
setup(window.__REACT_DEVTOOLS_GLOBAL_HOOK__);
2120
}
2221

2322
window.addEventListener('message', welcome);
2423

25-
function setup(hook, extensionId) {
24+
function setup(hook) {
2625
if (hook == null) {
2726
// DevTools didn't get injected into this page (maybe b'c of the contentType).
2827
return;
@@ -56,7 +55,6 @@ function setup(hook, extensionId) {
5655
{
5756
source: 'react-devtools-bridge',
5857
payload: {event, payload},
59-
extensionId,
6058
},
6159
'*',
6260
transferable,

packages/react-devtools-extensions/src/main.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ const LOCAL_STORAGE_SUPPORTS_PROFILING_KEY =
2727
'React::DevTools::supportsProfiling';
2828

2929
const isChrome = getBrowserName() === 'Chrome';
30+
const isEdge = getBrowserName() === 'Edge';
3031

3132
let panelCreated = false;
3233

@@ -149,7 +150,7 @@ function createPanelIfReactLoaded() {
149150

150151
store = new Store(bridge, {
151152
isProfiling,
152-
supportsReloadAndProfile: isChrome,
153+
supportsReloadAndProfile: isChrome || isEdge,
153154
supportsProfiling,
154155
// At this time, the scheduling profiler can only parse Chrome performance profiles.
155156
supportsSchedulingProfiler: isChrome,

0 commit comments

Comments
 (0)