Bug 1773258 - [devtools] Avoid modifying sourcesWithUrls when sources without a URL is removed. r=bomsy
authorAlexandre Poirot <poirot.alex@gmail.com>
Thu, 16 Jun 2022 16:34:39 +0000
changeset 621165 04aa113b0259444e7cd76d88fde2a8c739762565
parent 621164 faf8636ac2d9c41f73024882b4730e59b84c8463
child 621166 829df1dfad70a24c4f71af39c9cb0678eafcb4bf
push id39861
push usernfay@mozilla.com
push dateFri, 17 Jun 2022 09:39:07 +0000
treeherdermozilla-central@213305a52f15 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbomsy
bugs1773258
milestone103.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1773258 - [devtools] Avoid modifying sourcesWithUrls when sources without a URL is removed. r=bomsy Differential Revision: https://phabricator.services.mozilla.com/D149235
devtools/client/debugger/src/reducers/sources.js
--- a/devtools/client/debugger/src/reducers/sources.js
+++ b/devtools/client/debugger/src/reducers/sources.js
@@ -259,17 +259,16 @@ function addSources(state, sources) {
   return state;
 }
 
 function removeSourcesAndActors(state, sources) {
   state = {
     ...state,
     urls: { ...state.urls },
     plainUrls: { ...state.plainUrls },
-    sourcesWithUrls: [...state.sourcesWithUrls],
   };
 
   const newSourceMap = new Map(state.sources);
   for (const source of sources) {
     newSourceMap.delete(source.id);
 
     if (source.url) {
       // urls