Title: [143317] trunk/Source/WebCore
Revision
143317
Author
loi...@chromium.org
Date
2013-02-19 04:21:12 -0800 (Tue, 19 Feb 2013)

Log Message

Web Inspector: Native Memory Instrumentation: show user provided name property of the heap snapshot node.
https://bugs.webkit.org/show_bug.cgi?id=110124

Reviewed by Yury Semikhatsky.

Publish userProvidedName into grid node.

* inspector/front-end/HeapSnapshotGridNodes.js:
(WebInspector.HeapSnapshotGenericObjectNode):
(WebInspector.HeapSnapshotGenericObjectNode.prototype._createObjectCell):
(WebInspector.HeapSnapshotGenericObjectNode.prototype.get data):
* inspector/front-end/HeapSnapshotProxy.js:
(WebInspector.HeapSnapshotWorker):
* inspector/front-end/NativeHeapSnapshot.js:
(WebInspector.NativeHeapSnapshotNode.prototype.serialize):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (143316 => 143317)


--- trunk/Source/WebCore/ChangeLog	2013-02-19 12:15:11 UTC (rev 143316)
+++ trunk/Source/WebCore/ChangeLog	2013-02-19 12:21:12 UTC (rev 143317)
@@ -1,3 +1,21 @@
+2013-02-18  Ilya Tikhonovsky  <loi...@chromium.org>
+
+        Web Inspector: Native Memory Instrumentation: show user provided name property of the heap snapshot node.
+        https://bugs.webkit.org/show_bug.cgi?id=110124
+
+        Reviewed by Yury Semikhatsky.
+
+        Publish userProvidedName into grid node.
+
+        * inspector/front-end/HeapSnapshotGridNodes.js:
+        (WebInspector.HeapSnapshotGenericObjectNode):
+        (WebInspector.HeapSnapshotGenericObjectNode.prototype._createObjectCell):
+        (WebInspector.HeapSnapshotGenericObjectNode.prototype.get data):
+        * inspector/front-end/HeapSnapshotProxy.js:
+        (WebInspector.HeapSnapshotWorker):
+        * inspector/front-end/NativeHeapSnapshot.js:
+        (WebInspector.NativeHeapSnapshotNode.prototype.serialize):
+
 2013-02-19  Arpita Bahuguna  <a....@samsung.com>
 
         Caret is not displayed when trying to focus inside a contenteditable element containing an empty block.

Modified: trunk/Source/WebCore/inspector/front-end/HeapSnapshotGridNodes.js (143316 => 143317)


--- trunk/Source/WebCore/inspector/front-end/HeapSnapshotGridNodes.js	2013-02-19 12:15:11 UTC (rev 143316)
+++ trunk/Source/WebCore/inspector/front-end/HeapSnapshotGridNodes.js	2013-02-19 12:21:12 UTC (rev 143317)
@@ -350,6 +350,7 @@
     if (!node)
         return;
     this._name = node.name;
+    this._displayName = node.displayName;
     this._type = node.type;
     this._distance = node.distance;
     this._shallowSize = node.selfSize;
@@ -383,19 +384,31 @@
         var div = document.createElement("div");
         div.className = "source-code event-properties";
         div.style.overflow = "visible";
+
         var data = ""
         if (this._prefixObjectCell)
             this._prefixObjectCell(div, data);
+
         var valueSpan = document.createElement("span");
         valueSpan.className = "value console-formatted-" + data.valueStyle;
         valueSpan.textContent = data.value;
         div.appendChild(valueSpan);
+
+        if (this.data.displayName) {
+            var nameSpan = document.createElement("span");
+            nameSpan.className = "name console-formatted-name";
+            nameSpan.textContent = " " + this.data.displayName;
+            div.appendChild(nameSpan);
+        }
+
         var idSpan = document.createElement("span");
         idSpan.className = "console-formatted-id";
         idSpan.textContent = " @" + data["nodeId"];
         div.appendChild(idSpan);
+
         if (this._postfixObjectCell)
             this._postfixObjectCell(div, data);
+
         cell.appendChild(div);
         cell.addStyleClass("disclosure");
         if (this.depth)
@@ -444,6 +457,7 @@
             valueStyle += " detached-dom-tree-node";
         data["object"] = { valueStyle: valueStyle, value: value, nodeId: this.snapshotNodeId };
 
+        data["displayName"] = this._displayName;
         data["distance"] =  this._distance;
         data["shallowSize"] = Number.withThousandsSeparator(this._shallowSize);
         data["retainedSize"] = Number.withThousandsSeparator(this._retainedSize);

Modified: trunk/Source/WebCore/inspector/front-end/NativeHeapSnapshot.js (143316 => 143317)


--- trunk/Source/WebCore/inspector/front-end/NativeHeapSnapshot.js	2013-02-19 12:15:11 UTC (rev 143316)
+++ trunk/Source/WebCore/inspector/front-end/NativeHeapSnapshot.js	2013-02-19 12:21:12 UTC (rev 143317)
@@ -109,6 +109,7 @@
         return {
             id: this.id(),
             name: this.className(),
+            displayName: this.name(),
             distance: this.distance(),
             nodeIndex: this.nodeIndex,
             retainedSize: this.retainedSize(),
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to