⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 244275 in webkit


Ignore:
Timestamp:
Apr 15, 2019, 11:47:38 AM (7 years ago)
Author:
Devin Rousso
Message:

Web Inspector: Heap: logging an object from a snapshot shouldn't use the "special" style if the object is reachable
https://bugs.webkit.org/show_bug.cgi?id=196889
<rdar://problem/49870693>

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:

(WI.HeapSnapshotInstanceDataGridNode.logHeapSnapshotNode):

Location:
trunk/Source/WebInspectorUI
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r244274 r244275  
     12019-04-15  Devin Rousso  <drousso@apple.com>
     2
     3        Web Inspector: Heap: logging an object from a snapshot shouldn't use the "special" style if the object is reachable
     4        https://bugs.webkit.org/show_bug.cgi?id=196889
     5        <rdar://problem/49870693>
     6
     7        Reviewed by Joseph Pecoraro.
     8
     9        * UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
     10        (WI.HeapSnapshotInstanceDataGridNode.logHeapSnapshotNode):
     11
    1122019-04-15  Devin Rousso  <drousso@apple.com>
    213
  • trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotInstanceDataGridNode.js

    r241787 r244275  
    5353    static logHeapSnapshotNode(node)
    5454    {
    55         let heapObjectIdentifier = node.id;
    56         let shouldRevealConsole = true;
    57         let text = WI.UIString("Heap Snapshot Object (%s)").format("@" + heapObjectIdentifier);
    58 
    5955        node.shortestGCRootPath((gcRootPath) => {
     56            let text = WI.UIString("Heap Snapshot Object (%s)").format("@" + node.id);
     57            let addSpecialUserLogClass = !gcRootPath.length;
     58
    6059            if (gcRootPath.length) {
    6160                gcRootPath = gcRootPath.slice().reverse();
     
    7473                }
    7574
    76                 if (!heapSnapshotRootPath.isFullPathImpossible())
     75                if (heapSnapshotRootPath.isFullPathImpossible())
     76                    addSpecialUserLogClass = true;
     77                else
    7778                    text = heapSnapshotRootPath.fullPath;
    7879            }
    7980
     81            const shouldRevealConsole = true;
     82
    8083            if (node.className === "string") {
    81                 HeapAgent.getPreview(heapObjectIdentifier, function(error, string, functionDetails, objectPreviewPayload) {
     84                HeapAgent.getPreview(node.id, function(error, string, functionDetails, objectPreviewPayload) {
    8285                    let remoteObject = error ? WI.RemoteObject.fromPrimitiveValue(undefined) : WI.RemoteObject.fromPrimitiveValue(string);
    83                     WI.consoleLogViewController.appendImmediateExecutionWithResult(text, remoteObject, shouldRevealConsole);
     86                    WI.consoleLogViewController.appendImmediateExecutionWithResult(text, remoteObject, addSpecialUserLogClass, shouldRevealConsole);
    8487                });
    8588            } else {
    86                 HeapAgent.getRemoteObject(heapObjectIdentifier, WI.RuntimeManager.ConsoleObjectGroup, function(error, remoteObjectPayload) {
     89                HeapAgent.getRemoteObject(node.id, WI.RuntimeManager.ConsoleObjectGroup, function(error, remoteObjectPayload) {
    8790                    let remoteObject = error ? WI.RemoteObject.fromPrimitiveValue(undefined) : WI.RemoteObject.fromPayload(remoteObjectPayload, WI.assumingMainTarget());
    88                     WI.consoleLogViewController.appendImmediateExecutionWithResult(text, remoteObject, shouldRevealConsole);
     91                    WI.consoleLogViewController.appendImmediateExecutionWithResult(text, remoteObject, addSpecialUserLogClass, shouldRevealConsole);
    8992                });
    9093            }
Note: See TracChangeset for help on using the changeset viewer.