mirror of
https://github.com/zebrajr/react.git
synced 2025-12-06 12:20:20 +01:00
[DevTools] fix: validate url in file fetcher bridging calls (#34498)
This was prone to races and sometimes messed up symbolication when multiple source maps were fetched simultaneously.
This commit is contained in:
parent
67a44bcd1b
commit
92d7ad5dd9
|
|
@ -82,7 +82,7 @@ const fetchFromPage = async (url, resolve, reject) => {
|
|||
debugLog('[main] fetchFromPage()', url);
|
||||
|
||||
function onPortMessage({payload, source}) {
|
||||
if (source === 'react-devtools-background') {
|
||||
if (source === 'react-devtools-background' && payload?.url === url) {
|
||||
switch (payload?.type) {
|
||||
case 'fetch-file-with-cache-complete':
|
||||
chrome.runtime.onMessage.removeListener(onPortMessage);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user