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

Unified Diff: tracing/tracing/base/iteration_helpers.html

Issue 2747453003: Refactor histogram-set-view to an MVC pattern. (Closed)
Patch Set: Created 3 years, 8 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 | « tracing/trace_viewer.gypi ('k') | tracing/tracing/base/view_state.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/base/iteration_helpers.html
diff --git a/tracing/tracing/base/iteration_helpers.html b/tracing/tracing/base/iteration_helpers.html
index 397f5ac36b056d05cd59fc55003d0ed5c719af2d..c695673c79c4130325cef321d719640151dbdad5 100644
--- a/tracing/tracing/base/iteration_helpers.html
+++ b/tracing/tracing/base/iteration_helpers.html
@@ -373,7 +373,11 @@ tr.exportTo('tr.b', function() {
function setsEqual(a, b) {
if (!(a instanceof Set) || !(b instanceof Set)) return false;
if (a.size !== b.size) return false;
- return Array.from(a).every(x => b.has(x));
+ // Avoid Array.from() here -- it creates garbage.
+ for (const x of a) {
+ if (!b.has(x)) return false;
+ }
+ return true;
}
return {
« no previous file with comments | « tracing/trace_viewer.gypi ('k') | tracing/tracing/base/view_state.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698