Changeset 106738 in webkit
- Timestamp:
- Feb 4, 2012 2:20:07 AM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r106737 r106738 1 2012-02-03 Ilya Tikhonovsky <loislo@chromium.org> 2 3 Web Inspector: get rid of cycles in retaining tree 4 https://bugs.webkit.org/show_bug.cgi?id=77801 5 6 Drive by fix: 'retained by' prefix was removed. 7 8 Reviewed by Yury Semikhatsky. 9 10 * inspector/front-end/DetailedHeapshotGridNodes.js: 11 (WebInspector.HeapSnapshotObjectNode): 12 (WebInspector.HeapSnapshotObjectNode.prototype._updateHasChildren): 13 (WebInspector.HeapSnapshotObjectNode.prototype._createChildNode): 14 (WebInspector.HeapSnapshotObjectNode.prototype._prefixObjectCell): 15 * inspector/front-end/profilesPanel.css: 16 (.cycled-ancessor-node): 17 1 18 2012-02-04 Kentaro Hara <haraken@chromium.org> 2 19 -
trunk/Source/WebCore/inspector/front-end/DetailedHeapshotGridNodes.js
r106665 r106738 329 329 }, 330 330 331 _updateHasChildren: function()331 updateHasChildren: function() 332 332 { 333 333 function isEmptyCallback(isEmpty) … … 360 360 WebInspector.HeapSnapshotGenericObjectNode.prototype.__proto__ = WebInspector.HeapSnapshotGridNode.prototype; 361 361 362 WebInspector.HeapSnapshotObjectNode = function(tree, isFromBaseSnapshot, edge )362 WebInspector.HeapSnapshotObjectNode = function(tree, isFromBaseSnapshot, edge, parentGridNode) 363 363 { 364 364 WebInspector.HeapSnapshotGenericObjectNode.call(this, tree, edge.node); … … 369 369 this._isFromBaseSnapshot = isFromBaseSnapshot; 370 370 this._provider = this._createProvider(!isFromBaseSnapshot ? tree.snapshot : tree.baseSnapshot, edge.nodeIndex, tree); 371 this. _updateHasChildren();371 this.updateHasChildren(parentGridNode); 372 372 } 373 373 374 374 WebInspector.HeapSnapshotObjectNode.prototype = { 375 updateHasChildren: function(parentGridNode) 376 { 377 if (this._retainerNode) { 378 this._parentGridNode = parentGridNode; 379 var ancestor = parentGridNode; 380 while (ancestor) { 381 if (ancestor.snapshotNodeId === this.snapshotNodeId) { 382 this._cycledWithAncestorGridNode = ancestor; 383 return; 384 } 385 ancestor = ancestor._parentGridNode; 386 } 387 } 388 WebInspector.HeapSnapshotGenericObjectNode.prototype.updateHasChildren.call(this); 389 }, 390 375 391 _createChildNode: function(item) 376 392 { 377 return new WebInspector.HeapSnapshotObjectNode(this.dataGrid, this._isFromBaseSnapshot, item );393 return new WebInspector.HeapSnapshotObjectNode(this.dataGrid, this._isFromBaseSnapshot, item, this); 378 394 }, 379 395 … … 441 457 { 442 458 if (this._retainerNode) { 443 var prefixSpan = document.createElement("span"); 444 prefixSpan.textContent = WebInspector.UIString("retained by "); 445 div.appendChild(prefixSpan); 459 if (this._cycledWithAncestorGridNode) 460 div.className += " cycled-ancessor-node"; 446 461 return; 447 462 } … … 476 491 this._isDeletedNode = !!baseSnapshot; 477 492 this._provider = this._createProvider(baseSnapshot || snapshot, node.nodeIndex); 478 this. _updateHasChildren();493 this.updateHasChildren(); 479 494 }; 480 495 … … 806 821 WebInspector.HeapSnapshotGenericObjectNode.call(this, tree, node); 807 822 this._provider = this._createProvider(tree.snapshot, node.nodeIndex); 808 this. _updateHasChildren();823 this.updateHasChildren(); 809 824 }; 810 825 -
trunk/Source/WebCore/inspector/front-end/profilesPanel.css
r103803 r106738 175 175 } 176 176 177 .cycled-ancessor-node { 178 color: lightgray; 179 } 180 177 181 .panel-enabler-view.profile-launcher-view button:not(.status-bar-item) { 178 182 color: rgb(6, 6, 6);
Note: See TracChangeset
for help on using the changeset viewer.