Title: [264124] trunk/Source/WebInspectorUI
Revision
264124
Author
chris.r...@sony.com
Date
2020-07-08 11:51:01 -0700 (Wed, 08 Jul 2020)

Log Message

Heap Snapshot Object Graph view doesn't get populated in some cases when inspecting a JSContext
https://bugs.webkit.org/show_bug.cgi?id=214054

Reviewed by Devin Rousso.

When JSContexts are created with a custom globalObjectClass, that object is an
instance of CallbackGlobalObject and not GlobalObject so the view doesn't get populated.
Add instances of CallbackGlobalObject to the Object Graph view as top level nodes.

* UserInterface/Views/HeapSnapshotDataGridTree.js:

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (264123 => 264124)


--- trunk/Source/WebInspectorUI/ChangeLog	2020-07-08 18:45:20 UTC (rev 264123)
+++ trunk/Source/WebInspectorUI/ChangeLog	2020-07-08 18:51:01 UTC (rev 264124)
@@ -1,3 +1,16 @@
+2020-07-08  Christopher Reid  <chris.r...@sony.com>
+
+        Heap Snapshot Object Graph view doesn't get populated in some cases when inspecting a JSContext
+        https://bugs.webkit.org/show_bug.cgi?id=214054
+
+        Reviewed by Devin Rousso.
+
+        When JSContexts are created with a custom globalObjectClass, that object is an
+        instance of CallbackGlobalObject and not GlobalObject so the view doesn't get populated.
+        Add instances of CallbackGlobalObject to the Object Graph view as top level nodes.
+
+        * UserInterface/Views/HeapSnapshotDataGridTree.js:
+
 2020-07-07  Devin Rousso  <drou...@apple.com>
 
         Web Inspector: Canvas: show an error message if unable to fetch shader source

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotDataGridTree.js (264123 => 264124)


--- trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotDataGridTree.js	2020-07-08 18:45:20 UTC (rev 264123)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotDataGridTree.js	2020-07-08 18:51:01 UTC (rev 264124)
@@ -263,11 +263,18 @@
 
     populateTopLevel()
     {
+        // FIXME: <https://webkit.org/b/214092> Web Inspector: Object Graph view shouldn't hardcode class names for root nodes
+
         this.heapSnapshot.instancesWithClassName("GlobalObject", (instances) => {
             for (let instance of instances)
                 this.appendChild(new WI.HeapSnapshotInstanceDataGridNode(instance, this));
         });
 
+        this.heapSnapshot.instancesWithClassName("CallbackGlobalObject", (instances) => {
+            for (let instance of instances)
+                this.appendChild(new WI.HeapSnapshotInstanceDataGridNode(instance, this));
+        });
+
         this.heapSnapshot.instancesWithClassName("Window", (instances) => {
             for (let instance of instances) {
                 // FIXME: Why is the window.Window Function classified as a Window?
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to