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

Unified Diff: tools/profileview.js

Issue 99054: TickProcessor script reimplemented in JavaScript. (Closed)
Patch Set: Addressed Soeren's comments Created 11 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 | « tools/profile.js ('k') | tools/tickprocessor.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/profileview.js
diff --git a/tools/profileview.js b/tools/profileview.js
index 53ef6d9e8ccd97bbd5e8bcc851dffb59f7790187..8cffccc7ca2d4edef5a66e7726918347f0f162e1 100644
--- a/tools/profileview.js
+++ b/tools/profileview.js
@@ -100,11 +100,12 @@ devtools.profiler.ProfileView.prototype.sort = function(sortFunc) {
* @param {function(devtools.profiler.ProfileView.Node)} f Visitor function.
*/
devtools.profiler.ProfileView.prototype.traverse = function(f) {
- var nodesToTraverse = [this.head];
- while (nodesToTraverse.length > 0) {
- var node = nodesToTraverse.shift();
+ var nodesToTraverse = new ConsArray();
+ nodesToTraverse.concat([this.head]);
+ while (!nodesToTraverse.atEnd()) {
+ var node = nodesToTraverse.next();
f(node);
- nodesToTraverse = nodesToTraverse.concat(node.children);
+ nodesToTraverse.concat(node.children);
}
};
« no previous file with comments | « tools/profile.js ('k') | tools/tickprocessor.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698