Changeset 244275 in webkit
- Timestamp:
- Apr 15, 2019, 11:47:38 AM (7 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
UserInterface/Views/HeapSnapshotInstanceDataGridNode.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r244274 r244275 1 2019-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 1 12 2019-04-15 Devin Rousso <drousso@apple.com> 2 13 -
trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotInstanceDataGridNode.js
r241787 r244275 53 53 static logHeapSnapshotNode(node) 54 54 { 55 let heapObjectIdentifier = node.id;56 let shouldRevealConsole = true;57 let text = WI.UIString("Heap Snapshot Object (%s)").format("@" + heapObjectIdentifier);58 59 55 node.shortestGCRootPath((gcRootPath) => { 56 let text = WI.UIString("Heap Snapshot Object (%s)").format("@" + node.id); 57 let addSpecialUserLogClass = !gcRootPath.length; 58 60 59 if (gcRootPath.length) { 61 60 gcRootPath = gcRootPath.slice().reverse(); … … 74 73 } 75 74 76 if (!heapSnapshotRootPath.isFullPathImpossible()) 75 if (heapSnapshotRootPath.isFullPathImpossible()) 76 addSpecialUserLogClass = true; 77 else 77 78 text = heapSnapshotRootPath.fullPath; 78 79 } 79 80 81 const shouldRevealConsole = true; 82 80 83 if (node.className === "string") { 81 HeapAgent.getPreview( heapObjectIdentifier, function(error, string, functionDetails, objectPreviewPayload) {84 HeapAgent.getPreview(node.id, function(error, string, functionDetails, objectPreviewPayload) { 82 85 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); 84 87 }); 85 88 } else { 86 HeapAgent.getRemoteObject( heapObjectIdentifier, WI.RuntimeManager.ConsoleObjectGroup, function(error, remoteObjectPayload) {89 HeapAgent.getRemoteObject(node.id, WI.RuntimeManager.ConsoleObjectGroup, function(error, remoteObjectPayload) { 87 90 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); 89 92 }); 90 93 }
Note:
See TracChangeset
for help on using the changeset viewer.