Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(130)

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/bindings/CompilerScriptMapping.js

Issue 2534053002: DevTools: dedupe source maps when resetting debugging project. (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 var script = this._scriptForSourceMap.get(sourceMap); 359 var script = this._scriptForSourceMap.get(sourceMap);
360 if (!script) 360 if (!script)
361 return; 361 return;
362 for (var sourceURL of sourceMap.sourceURLs()) { 362 for (var sourceURL of sourceMap.sourceURLs()) {
363 var uiSourceCode = Bindings.NetworkProject.uiSourceCodeForScriptURL(this ._workspace, sourceURL, script); 363 var uiSourceCode = Bindings.NetworkProject.uiSourceCodeForScriptURL(this ._workspace, sourceURL, script);
364 if (uiSourceCode) 364 if (uiSourceCode)
365 this._unbindUISourceCode(uiSourceCode); 365 this._unbindUISourceCode(uiSourceCode);
366 } 366 }
367 } 367 }
368 368
369 this._sourceMapForURL.valuesArray().forEach(unbindSourceMapSources.bind(this )); 369 Array.from(new Set(this._sourceMapForURL.values())).forEach(unbindSourceMapS ources.bind(this));
370 370
371 this._sourceMapLoadingPromises.clear(); 371 this._sourceMapLoadingPromises.clear();
372 this._sourceMapForScriptId.clear(); 372 this._sourceMapForScriptId.clear();
373 this._scriptForSourceMap.clear(); 373 this._scriptForSourceMap.clear();
374 this._sourceMapForURL.clear(); 374 this._sourceMapForURL.clear();
375 } 375 }
376 376
377 dispose() { 377 dispose() {
378 Common.EventTarget.removeEventListeners(this._eventListeners); 378 Common.EventTarget.removeEventListeners(this._eventListeners);
379 this._debuggerReset(); 379 this._debuggerReset();
380 this._stubProject.dispose(); 380 this._stubProject.dispose();
381 } 381 }
382 }; 382 };
383 383
384 Bindings.CompilerScriptMapping._originSymbol = Symbol('origin'); 384 Bindings.CompilerScriptMapping._originSymbol = Symbol('origin');
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698