@samitouri / QOS-React-2 / commits / 9c8161ba81

Reapply changes from #22631 (#22645)

Juan committed Oct 28, 2021 at 11:04 UTC 9c8161ba81220143e7f87bd901697e46b14d8968
2 files changed +4 -5
packages/react-devtools-extensions/src/backend.js
+2 -4
@@ -13,16 +13,15 @@ function welcome(event) {
13 ) {
14 return;
15 }
16 - const extensionId = event.data.extensionId;
16
17 window.removeEventListener('message', welcome);
18
20 - setup(window.__REACT_DEVTOOLS_GLOBAL_HOOK__, extensionId);
19 + setup(window.__REACT_DEVTOOLS_GLOBAL_HOOK__);
20 }
21
22 window.addEventListener('message', welcome);
23
25 -function setup(hook, extensionId) {
24 +function setup(hook) {
25 if (hook == null) {
26 // DevTools didn't get injected into this page (maybe b'c of the contentType).
27 return;
@@ -56,7 +55,6 @@ function setup(hook, extensionId) {
55 {
56 source: 'react-devtools-bridge',
57 payload: {event, payload},
59 - extensionId,
58 },
59 '*',
60 transferable,
packages/react-devtools-extensions/src/main.js
+2 -1
@@ -27,6 +27,7 @@ const LOCAL_STORAGE_SUPPORTS_PROFILING_KEY =
27 'React::DevTools::supportsProfiling';
28
29 const isChrome = getBrowserName() === 'Chrome';
30 +const isEdge = getBrowserName() === 'Edge';
31
32 let panelCreated = false;
33
@@ -149,7 +150,7 @@ function createPanelIfReactLoaded() {
150
151 store = new Store(bridge, {
152 isProfiling,
152 - supportsReloadAndProfile: isChrome,
153 + supportsReloadAndProfile: isChrome || isEdge,
154 supportsProfiling,
155 // At this time, the scheduling profiler can only parse Chrome performance profiles.
156 supportsSchedulingProfiler: isChrome,