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

Unified Diff: third_party/WebKit/Source/devtools/front_end/source_frame/UISourceCodeFrame.js

Issue 2752333002: DevTools: more efficiently dispose messages on console clear (Closed)
Patch Set: Set instead of array Created 3 years, 9 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/workspace/UISourceCode.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/source_frame/UISourceCodeFrame.js
diff --git a/third_party/WebKit/Source/devtools/front_end/source_frame/UISourceCodeFrame.js b/third_party/WebKit/Source/devtools/front_end/source_frame/UISourceCodeFrame.js
index c9f57c925e5bd3f8db65e0bfeb759582121ae54e..da0635bdef429c3f113267032281cc5083bbf68d 100644
--- a/third_party/WebKit/Source/devtools/front_end/source_frame/UISourceCodeFrame.js
+++ b/third_party/WebKit/Source/devtools/front_end/source_frame/UISourceCodeFrame.js
@@ -175,12 +175,15 @@ SourceFrame.UISourceCodeFrame = class extends SourceFrame.SourceFrame {
}
/**
- * @return {!Array<!Workspace.UISourceCode.Message>}
+ * @return {!Set<!Workspace.UISourceCode.Message>}
*/
_allMessages() {
- return this._persistenceBinding ?
- this._persistenceBinding.network.messages().concat(this._persistenceBinding.fileSystem.messages()) :
- this._uiSourceCode.messages();
+ if (this._persistenceBinding) {
+ var combinedSet = this._persistenceBinding.network.messages();
+ combinedSet.addAll(this._persistenceBinding.fileSystem.messages());
+ return combinedSet;
+ }
+ return this._uiSourceCode.messages();
}
/**
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/workspace/UISourceCode.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698