[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:
Ruslan Lesiutin 2025-09-15 18:14:09 +01:00 committed by GitHub
parent 67a44bcd1b
commit 92d7ad5dd9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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);