Changeset 143317 in webkit


Ignore:
Timestamp:
Feb 19, 2013 4:21:12 AM (11 years ago)
Author:
loislo@chromium.org
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):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r143313 r143317  
     12013-02-18  Ilya Tikhonovsky  <loislo@chromium.org>
     2
     3        Web Inspector: Native Memory Instrumentation: show user provided name property of the heap snapshot node.
     4        https://bugs.webkit.org/show_bug.cgi?id=110124
     5
     6        Reviewed by Yury Semikhatsky.
     7
     8        Publish userProvidedName into grid node.
     9
     10        * inspector/front-end/HeapSnapshotGridNodes.js:
     11        (WebInspector.HeapSnapshotGenericObjectNode):
     12        (WebInspector.HeapSnapshotGenericObjectNode.prototype._createObjectCell):
     13        (WebInspector.HeapSnapshotGenericObjectNode.prototype.get data):
     14        * inspector/front-end/HeapSnapshotProxy.js:
     15        (WebInspector.HeapSnapshotWorker):
     16        * inspector/front-end/NativeHeapSnapshot.js:
     17        (WebInspector.NativeHeapSnapshotNode.prototype.serialize):
     18
    1192013-02-19  Arpita Bahuguna  <a.bah@samsung.com>
    220
  • trunk/Source/WebCore/inspector/front-end/HeapSnapshotGridNodes.js

    r142460 r143317  
    351351        return;
    352352    this._name = node.name;
     353    this._displayName = node.displayName;
    353354    this._type = node.type;
    354355    this._distance = node.distance;
     
    384385        div.className = "source-code event-properties";
    385386        div.style.overflow = "visible";
     387
    386388        var data = this.data["object"];
    387389        if (this._prefixObjectCell)
    388390            this._prefixObjectCell(div, data);
     391
    389392        var valueSpan = document.createElement("span");
    390393        valueSpan.className = "value console-formatted-" + data.valueStyle;
    391394        valueSpan.textContent = data.value;
    392395        div.appendChild(valueSpan);
     396
     397        if (this.data.displayName) {
     398            var nameSpan = document.createElement("span");
     399            nameSpan.className = "name console-formatted-name";
     400            nameSpan.textContent = " " + this.data.displayName;
     401            div.appendChild(nameSpan);
     402        }
     403
    393404        var idSpan = document.createElement("span");
    394405        idSpan.className = "console-formatted-id";
    395406        idSpan.textContent = " @" + data["nodeId"];
    396407        div.appendChild(idSpan);
     408
    397409        if (this._postfixObjectCell)
    398410            this._postfixObjectCell(div, data);
     411
    399412        cell.appendChild(div);
    400413        cell.addStyleClass("disclosure");
     
    445458        data["object"] = { valueStyle: valueStyle, value: value, nodeId: this.snapshotNodeId };
    446459
     460        data["displayName"] = this._displayName;
    447461        data["distance"] =  this._distance;
    448462        data["shallowSize"] = Number.withThousandsSeparator(this._shallowSize);
  • trunk/Source/WebCore/inspector/front-end/NativeHeapSnapshot.js

    r143218 r143317  
    110110            id: this.id(),
    111111            name: this.className(),
     112            displayName: this.name(),
    112113            distance: this.distance(),
    113114            nodeIndex: this.nodeIndex,
Note: See TracChangeset for help on using the changeset viewer.