Title: [141415] trunk/Source/WebCore
Revision
141415
Author
[email protected]
Date
2013-01-31 06:15:28 -0800 (Thu, 31 Jan 2013)

Log Message

Web Inspector: Exception in HeapSnapshotView.js
https://bugs.webkit.org/show_bug.cgi?id=108456

Reviewed by Yury Semikhatsky.

Listen "profile added" events in the HeapSnapshotView targeted only to the Heap Snapshot type.

* inspector/front-end/HeapSnapshotView.js:
(WebInspector.HeapSnapshotView.prototype._onProfileHeaderAdded):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (141414 => 141415)


--- trunk/Source/WebCore/ChangeLog	2013-01-31 14:10:36 UTC (rev 141414)
+++ trunk/Source/WebCore/ChangeLog	2013-01-31 14:15:28 UTC (rev 141415)
@@ -1,3 +1,15 @@
+2013-01-31  Andrey Adaikin  <[email protected]>
+
+        Web Inspector: Exception in HeapSnapshotView.js
+        https://bugs.webkit.org/show_bug.cgi?id=108456
+
+        Reviewed by Yury Semikhatsky.
+
+        Listen "profile added" events in the HeapSnapshotView targeted only to the Heap Snapshot type.
+
+        * inspector/front-end/HeapSnapshotView.js:
+        (WebInspector.HeapSnapshotView.prototype._onProfileHeaderAdded):
+
 2013-01-31  Andrey Lushnikov  <[email protected]>
 
         Web Inspector: do not set any textContent in overlay highlight spans

Modified: trunk/Source/WebCore/inspector/front-end/HeapSnapshotView.js (141414 => 141415)


--- trunk/Source/WebCore/inspector/front-end/HeapSnapshotView.js	2013-01-31 14:10:36 UTC (rev 141414)
+++ trunk/Source/WebCore/inspector/front-end/HeapSnapshotView.js	2013-01-31 14:15:28 UTC (rev 141415)
@@ -32,6 +32,7 @@
  * @constructor
  * @extends {WebInspector.View}
  * @param {WebInspector.ProfilesPanel} parent
+ * @param {WebInspector.HeapProfileHeader} profile
  */
 WebInspector.HeapSnapshotView = function(parent, profile)
 {
@@ -40,8 +41,7 @@
     this.element.addStyleClass("heap-snapshot-view");
 
     this.parent = parent;
-    this.parent.addEventListener("profile added", this._updateBaseOptions, this);
-    this.parent.addEventListener("profile added", this._updateFilterOptions, this);
+    this.parent.addEventListener("profile added", this._onProfileHeaderAdded, this);
 
     this.viewsContainer = document.createElement("div");
     this.viewsContainer.addStyleClass("views-container");
@@ -120,6 +120,7 @@
     }
 
     this._profileUid = profile.uid;
+    this._profileTypeId = profile.profileType().id;
 
     this.baseSelectElement = document.createElement("select");
     this.baseSelectElement.className = "status-bar-item";
@@ -734,6 +735,17 @@
         }
     },
 
+    /**
+     * @param {WebInspector.Event} event
+     */
+    _onProfileHeaderAdded: function(event)
+    {
+        if (!event.data || event.data.type !== this._profileTypeId)
+            return;
+        this._updateBaseOptions();
+        this._updateFilterOptions();
+    },
+
     __proto__: WebInspector.View.prototype
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to