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

Side by Side Diff: Source/devtools/front_end/heap_snapshot_worker/HeapSnapshot.js

Issue 674443003: DevTools: ignore weak referenced when calculating dominators for heap snapshot (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Renamed test function named as suggested by loislo Created 6 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « LayoutTests/inspector/profiler/heap-snapshot-weak-dominator-expected.txt ('k') | 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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 1540 matching lines...) Expand 10 before | Expand all | Expand 10 after
1551 { 1551 {
1552 var nodeFieldCount = this._nodeFieldCount; 1552 var nodeFieldCount = this._nodeFieldCount;
1553 var nodes = this.nodes; 1553 var nodes = this.nodes;
1554 var firstRetainerIndex = this._firstRetainerIndex; 1554 var firstRetainerIndex = this._firstRetainerIndex;
1555 var retainingNodes = this._retainingNodes; 1555 var retainingNodes = this._retainingNodes;
1556 var retainingEdges = this._retainingEdges; 1556 var retainingEdges = this._retainingEdges;
1557 var edgeFieldsCount = this._edgeFieldsCount; 1557 var edgeFieldsCount = this._edgeFieldsCount;
1558 var edgeTypeOffset = this._edgeTypeOffset; 1558 var edgeTypeOffset = this._edgeTypeOffset;
1559 var edgeToNodeOffset = this._edgeToNodeOffset; 1559 var edgeToNodeOffset = this._edgeToNodeOffset;
1560 var edgeShortcutType = this._edgeShortcutType; 1560 var edgeShortcutType = this._edgeShortcutType;
1561 var edgeWeakType = this._edgeWeakType;
1561 var firstEdgeIndexes = this._firstEdgeIndexes; 1562 var firstEdgeIndexes = this._firstEdgeIndexes;
1562 var containmentEdges = this.containmentEdges; 1563 var containmentEdges = this.containmentEdges;
1563 var containmentEdgesLength = this.containmentEdges.length; 1564 var containmentEdgesLength = this.containmentEdges.length;
1564 var rootNodeIndex = this._rootNodeIndex; 1565 var rootNodeIndex = this._rootNodeIndex;
1565 1566
1566 var mapAndFlag = this.userObjectsMapAndFlag(); 1567 var mapAndFlag = this.userObjectsMapAndFlag();
1567 var flags = mapAndFlag ? mapAndFlag.map : null; 1568 var flags = mapAndFlag ? mapAndFlag.map : null;
1568 var flag = mapAndFlag ? mapAndFlag.flag : 0; 1569 var flag = mapAndFlag ? mapAndFlag.flag : 0;
1569 1570
1570 var nodesCount = postOrderIndex2NodeOrdinal.length; 1571 var nodesCount = postOrderIndex2NodeOrdinal.length;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
1604 if (dominators[postOrderIndex] === rootPostOrderedIndex) 1605 if (dominators[postOrderIndex] === rootPostOrderedIndex)
1605 continue; 1606 continue;
1606 nodeOrdinal = postOrderIndex2NodeOrdinal[postOrderIndex]; 1607 nodeOrdinal = postOrderIndex2NodeOrdinal[postOrderIndex];
1607 var nodeFlag = !flags || (flags[nodeOrdinal] & flag); 1608 var nodeFlag = !flags || (flags[nodeOrdinal] & flag);
1608 var newDominatorIndex = noEntry; 1609 var newDominatorIndex = noEntry;
1609 var beginRetainerIndex = firstRetainerIndex[nodeOrdinal]; 1610 var beginRetainerIndex = firstRetainerIndex[nodeOrdinal];
1610 var endRetainerIndex = firstRetainerIndex[nodeOrdinal + 1]; 1611 var endRetainerIndex = firstRetainerIndex[nodeOrdinal + 1];
1611 for (var retainerIndex = beginRetainerIndex; retainerIndex < end RetainerIndex; ++retainerIndex) { 1612 for (var retainerIndex = beginRetainerIndex; retainerIndex < end RetainerIndex; ++retainerIndex) {
1612 var retainerEdgeIndex = retainingEdges[retainerIndex]; 1613 var retainerEdgeIndex = retainingEdges[retainerIndex];
1613 var retainerEdgeType = containmentEdges[retainerEdgeIndex + edgeTypeOffset]; 1614 var retainerEdgeType = containmentEdges[retainerEdgeIndex + edgeTypeOffset];
1615 if (retainerEdgeType === edgeWeakType)
1616 continue;
1614 var retainerNodeIndex = retainingNodes[retainerIndex]; 1617 var retainerNodeIndex = retainingNodes[retainerIndex];
1615 if (retainerNodeIndex !== rootNodeIndex && retainerEdgeType === edgeShortcutType) 1618 if (retainerNodeIndex !== rootNodeIndex && retainerEdgeType === edgeShortcutType)
1616 continue; 1619 continue;
1617 var retainerNodeOrdinal = retainerNodeIndex / nodeFieldCount ; 1620 var retainerNodeOrdinal = retainerNodeIndex / nodeFieldCount ;
1618 var retainerNodeFlag = !flags || (flags[retainerNodeOrdinal] & flag); 1621 var retainerNodeFlag = !flags || (flags[retainerNodeOrdinal] & flag);
1619 // We are skipping the edges from non-page-owned nodes to pa ge-owned nodes. 1622 // We are skipping the edges from non-page-owned nodes to pa ge-owned nodes.
1620 // Otherwise the dominators for the objects that also were r etained by debugger would be affected. 1623 // Otherwise the dominators for the objects that also were r etained by debugger would be affected.
1621 if (retainerNodeIndex !== rootNodeIndex && nodeFlag && !reta inerNodeFlag) 1624 if (retainerNodeIndex !== rootNodeIndex && nodeFlag && !reta inerNodeFlag)
1622 continue; 1625 continue;
1623 var retanerPostOrderIndex = nodeOrdinal2PostOrderIndex[retai nerNodeOrdinal]; 1626 var retanerPostOrderIndex = nodeOrdinal2PostOrderIndex[retai nerNodeOrdinal];
(...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after
2251 * @param {number} windowRight 2254 * @param {number} windowRight
2252 */ 2255 */
2253 sort: function(comparator, leftBound, rightBound, windowLeft, windowRight) 2256 sort: function(comparator, leftBound, rightBound, windowLeft, windowRight)
2254 { 2257 {
2255 this._iterationOrder.sortRange(this._buildCompareFunction(comparator), l eftBound, rightBound, windowLeft, windowRight); 2258 this._iterationOrder.sortRange(this._buildCompareFunction(comparator), l eftBound, rightBound, windowLeft, windowRight);
2256 }, 2259 },
2257 2260
2258 __proto__: WebInspector.HeapSnapshotItemProvider.prototype 2261 __proto__: WebInspector.HeapSnapshotItemProvider.prototype
2259 } 2262 }
2260 2263
OLDNEW
« no previous file with comments | « LayoutTests/inspector/profiler/heap-snapshot-weak-dominator-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698