Web Inspector: exception in front-end on selecting an element in heap snapshot
authoryurys@chromium.org <yurys@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Feb 2012 08:28:43 +0000 (08:28 +0000)
committeryurys@chromium.org <yurys@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Feb 2012 08:28:43 +0000 (08:28 +0000)
https://bugs.webkit.org/show_bug.cgi?id=79447

Fixed a typo in method name and added a check that selected node has
corresponding heap snapshot object before adding that object to the console
as $0 entry.

Reviewed by Pavel Feldman.

* inspector/front-end/DetailedHeapshotView.js:
(WebInspector.DetailedHeapshotView.prototype._inspectedObjectChanged):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108743 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/inspector/front-end/DetailedHeapshotView.js

index 51769cb..8236bdc 100644 (file)
@@ -1,3 +1,17 @@
+2012-02-23  Yury Semikhatsky  <yurys@chromium.org>
+
+        Web Inspector: exception in front-end on selecting an element in heap snapshot
+        https://bugs.webkit.org/show_bug.cgi?id=79447
+
+        Fixed a typo in method name and added a check that selected node has
+        corresponding heap snapshot object before adding that object to the console
+        as $0 entry.
+
+        Reviewed by Pavel Feldman.
+
+        * inspector/front-end/DetailedHeapshotView.js:
+        (WebInspector.DetailedHeapshotView.prototype._inspectedObjectChanged):
+
 2012-02-23  Pavel Feldman  <pfeldman@chromium.org>
 
         Web Inspector: hide color picker upon panel switch.
index d933e5e..d35b203 100644 (file)
@@ -848,7 +848,8 @@ WebInspector.DetailedHeapshotView.prototype = {
     _inspectedObjectChanged: function(event)
     {
         var selectedNode = event.target.selectedNode;
-        ConsoleAgent.addInspectedObject(selectedNode.snapshotNodeId);
+        if (selectedNode instanceof WebInspector.HeapSnapshotGenericObjectNode)
+            ConsoleAgent.addInspectedHeapObject(selectedNode.snapshotNodeId);
     },
 
     _setRetainmentDataGridSource: function(nodeItem)