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

Skip to content

Commit 92d7ad5

Browse files
authored
[DevTools] fix: validate url in file fetcher bridging calls (facebook#34498)
This was prone to races and sometimes messed up symbolication when multiple source maps were fetched simultaneously.
1 parent 67a44bc commit 92d7ad5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ const fetchFromPage = async (url, resolve, reject) => {
8282
debugLog('[main] fetchFromPage()', url);
8383

8484
function onPortMessage({payload, source}) {
85-
if (source === 'react-devtools-background') {
85+
if (source === 'react-devtools-background' && payload?.url === url) {
8686
switch (payload?.type) {
8787
case 'fetch-file-with-cache-complete':
8888
chrome.runtime.onMessage.removeListener(onPortMessage);

0 commit comments

Comments
 (0)