Modified: trunk/Source/WebInspectorUI/ChangeLog (244274 => 244275)
--- trunk/Source/WebInspectorUI/ChangeLog 2019-04-15 18:34:51 UTC (rev 244274)
+++ trunk/Source/WebInspectorUI/ChangeLog 2019-04-15 18:47:38 UTC (rev 244275)
@@ -1,5 +1,16 @@
2019-04-15 Devin Rousso <[email protected]>
+ 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):
+
+2019-04-15 Devin Rousso <[email protected]>
+
Web Inspector: Debugger: deleting a special breakpoint should disable it
https://bugs.webkit.org/show_bug.cgi?id=196737
<rdar://problem/49740680>
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotInstanceDataGridNode.js (244274 => 244275)
--- trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotInstanceDataGridNode.js 2019-04-15 18:34:51 UTC (rev 244274)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotInstanceDataGridNode.js 2019-04-15 18:47:38 UTC (rev 244275)
@@ -52,11 +52,10 @@
static logHeapSnapshotNode(node)
{
- let heapObjectIdentifier = node.id;
- let shouldRevealConsole = true;
- let text = WI.UIString("Heap Snapshot Object (%s)").format("@" + heapObjectIdentifier);
+ node.shortestGCRootPath((gcRootPath) => {
+ let text = WI.UIString("Heap Snapshot Object (%s)").format("@" + node.id);
+ let addSpecialUserLogClass = !gcRootPath.length;
- node.shortestGCRootPath((gcRootPath) => {
if (gcRootPath.length) {
gcRootPath = gcRootPath.slice().reverse();
let windowIndex = gcRootPath.findIndex((x) => {
@@ -73,19 +72,23 @@
heapSnapshotRootPath = heapSnapshotRootPath.appendEdge(component);
}
- if (!heapSnapshotRootPath.isFullPathImpossible())
+ if (heapSnapshotRootPath.isFullPathImpossible())
+ addSpecialUserLogClass = true;
+ else
text = heapSnapshotRootPath.fullPath;
}
+ const shouldRevealConsole = true;
+
if (node.className === "string") {
- HeapAgent.getPreview(heapObjectIdentifier, function(error, string, functionDetails, objectPreviewPayload) {
+ HeapAgent.getPreview(node.id, function(error, string, functionDetails, objectPreviewPayload) {
let remoteObject = error ? WI.RemoteObject.fromPrimitiveValue(undefined) : WI.RemoteObject.fromPrimitiveValue(string);
- WI.consoleLogViewController.appendImmediateExecutionWithResult(text, remoteObject, shouldRevealConsole);
+ WI.consoleLogViewController.appendImmediateExecutionWithResult(text, remoteObject, addSpecialUserLogClass, shouldRevealConsole);
});
} else {
- HeapAgent.getRemoteObject(heapObjectIdentifier, WI.RuntimeManager.ConsoleObjectGroup, function(error, remoteObjectPayload) {
+ HeapAgent.getRemoteObject(node.id, WI.RuntimeManager.ConsoleObjectGroup, function(error, remoteObjectPayload) {
let remoteObject = error ? WI.RemoteObject.fromPrimitiveValue(undefined) : WI.RemoteObject.fromPayload(remoteObjectPayload, WI.assumingMainTarget());
- WI.consoleLogViewController.appendImmediateExecutionWithResult(text, remoteObject, shouldRevealConsole);
+ WI.consoleLogViewController.appendImmediateExecutionWithResult(text, remoteObject, addSpecialUserLogClass, shouldRevealConsole);
});
}
});