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

Unified Diff: third_party/WebKit/Source/devtools/front_end/bindings/BlackboxManager.js

Issue 2371133003: [Devtools] Lazily build reverse mappings (Closed)
Patch Set: Make all parsing lazy. Created 4 years, 3 months 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/bindings/BlackboxManager.js
diff --git a/third_party/WebKit/Source/devtools/front_end/bindings/BlackboxManager.js b/third_party/WebKit/Source/devtools/front_end/bindings/BlackboxManager.js
index 5f20ec60fd80ac254bd3bb9442d2d8dc2e2580b7..5ba470cb223a1f052551c36d53c823b0aaeae41e 100644
--- a/third_party/WebKit/Source/devtools/front_end/bindings/BlackboxManager.js
+++ b/third_party/WebKit/Source/devtools/front_end/bindings/BlackboxManager.js
@@ -151,6 +151,19 @@ WebInspector.BlackboxManager.prototype = {
if (!previousScriptState)
return Promise.resolve();
+ var hasBlackboxedMappings = false;
lushnikov 2016/09/28 16:48:12 what's this code about?
eostroukhov 2016/09/28 23:26:33 There is no reason to check individual mappings if
lushnikov 2016/09/29 16:29:52 Nice, thanks
+ for (var scriptURL of sourceMap.sourceURLs()) {
+ if (this.isBlackboxedURL(scriptURL)) {
+ hasBlackboxedMappings = true;
+ break;
+ }
+ }
+ if (!hasBlackboxedMappings) {
+ if (previousScriptState.length > 0)
+ return this._setScriptState(script, []);
+ return Promise.resolve();
+ }
+
var mappings = sourceMap.mappings().slice();
mappings.sort(mappingComparator);

Powered by Google App Engine
This is Rietveld 408576698