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

Side by Side Diff: Source/devtools/front_end/timeline/TimelineModel.js

Issue 1317733002: DevTools: Fix exception on timeline clear (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 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 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 1535 matching lines...) Expand 10 before | Expand all | Expand 10 after
1546 */ 1546 */
1547 WebInspector.TimelineModel.buildBottomUpTree = function(topDownTree, groupingCal lback) 1547 WebInspector.TimelineModel.buildBottomUpTree = function(topDownTree, groupingCal lback)
1548 { 1548 {
1549 var buRoot = new WebInspector.TimelineModel.ProfileTreeNode(); 1549 var buRoot = new WebInspector.TimelineModel.ProfileTreeNode();
1550 buRoot.selfTime = 0; 1550 buRoot.selfTime = 0;
1551 buRoot.totalTime = 0; 1551 buRoot.totalTime = 0;
1552 buRoot.name = WebInspector.UIString("Bottom-Up Chart"); 1552 buRoot.name = WebInspector.UIString("Bottom-Up Chart");
1553 /** @type {!Map<string,!WebInspector.TimelineModel.ProfileTreeNode>} */ 1553 /** @type {!Map<string,!WebInspector.TimelineModel.ProfileTreeNode>} */
1554 buRoot.children = new Map(); 1554 buRoot.children = new Map();
1555 var nodesOnStack = /** @type {!Set<string>} */ (new Set()); 1555 var nodesOnStack = /** @type {!Set<string>} */ (new Set());
1556 topDownTree.children.forEach(processNode); 1556 if (topDownTree.children)
1557 topDownTree.children.forEach(processNode);
1557 1558
1558 /** 1559 /**
1559 * @param {!WebInspector.TimelineModel.ProfileTreeNode} tdNode 1560 * @param {!WebInspector.TimelineModel.ProfileTreeNode} tdNode
1560 */ 1561 */
1561 function processNode(tdNode) 1562 function processNode(tdNode)
1562 { 1563 {
1563 var buParent = groupingCallback && groupingCallback(tdNode) || buRoot; 1564 var buParent = groupingCallback && groupingCallback(tdNode) || buRoot;
1564 appendNode(tdNode, buParent); 1565 appendNode(tdNode, buParent);
1565 var hadNode = nodesOnStack.has(tdNode.id); 1566 var hadNode = nodesOnStack.has(tdNode.id);
1566 if (!hadNode) 1567 if (!hadNode)
(...skipping 795 matching lines...) Expand 10 before | Expand all | Expand 10 after
2362 /** @type {!Object.<string, !Array.<!WebInspector.InvalidationTrackingEv ent>>} */ 2363 /** @type {!Object.<string, !Array.<!WebInspector.InvalidationTrackingEv ent>>} */
2363 this._invalidations = {}; 2364 this._invalidations = {};
2364 /** @type {!Object.<number, !Array.<!WebInspector.InvalidationTrackingEv ent>>} */ 2365 /** @type {!Object.<number, !Array.<!WebInspector.InvalidationTrackingEv ent>>} */
2365 this._invalidationsByNodeId = {}; 2366 this._invalidationsByNodeId = {};
2366 2367
2367 this._lastRecalcStyle = undefined; 2368 this._lastRecalcStyle = undefined;
2368 this._lastPaintWithLayer = undefined; 2369 this._lastPaintWithLayer = undefined;
2369 this._didPaint = false; 2370 this._didPaint = false;
2370 } 2371 }
2371 } 2372 }
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