Commit 2d703185 authored by mnaganov@chromium.org's avatar mnaganov@chromium.org
Browse files

2011-02-14 Mikhail Naganov <mnaganov@chromium.org>

        Reviewed by Pavel Feldman.

        Web Inspector: [Chromium] Landing detailed heap snapshots, part 3.
        https://bugs.webkit.org/show_bug.cgi?id=54385

        Provide node classes for data grid views:
         - summary -- list of objects by constuctor;
         - diff -- summaries btw two snapshots;
         - explorer -- explore heap graph;
         - dominators tree;

        * WebCore.gypi:
        * WebCore.vcproj/WebCore.vcproj:
        * inspector/front-end/DetailedHeapshotGridNodes.js: Added.
        * inspector/front-end/HeapSnapshot.js:
        (WebInspector.HeapSnapshotFilteredOrderedIterator):
        (WebInspector.HeapSnapshotFilteredOrderedIterator.prototype.incInstancesCount):
        (WebInspector.HeapSnapshotFilteredOrderedIterator.prototype.get instancesCount):
        (WebInspector.HeapSnapshotFilteredOrderedIterator.prototype.next):
        (WebInspector.HeapSnapshotFilteredOrderedIterator.prototype.resetInstancesCount):
        (WebInspector.HeapSnapshotEdgesProvider):
        (WebInspector.HeapSnapshotNodesProvider):
        * inspector/front-end/PleaseWaitMessage.js:
        (WebInspector.PleaseWaitMessage.prototype.get instance):
        * inspector/front-end/WebKit.qrc:
        * inspector/front-end/inspector.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@78700 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 7064b610
2011-02-14 Mikhail Naganov <mnaganov@chromium.org>
Reviewed by Pavel Feldman.
Web Inspector: [Chromium] Landing detailed heap snapshots, part 3.
https://bugs.webkit.org/show_bug.cgi?id=54385
Provide node classes for data grid views:
- summary -- list of objects by constuctor;
- diff -- summaries btw two snapshots;
- explorer -- explore heap graph;
- dominators tree;
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* inspector/front-end/DetailedHeapshotGridNodes.js: Added.
* inspector/front-end/HeapSnapshot.js:
(WebInspector.HeapSnapshotFilteredOrderedIterator):
(WebInspector.HeapSnapshotFilteredOrderedIterator.prototype.incInstancesCount):
(WebInspector.HeapSnapshotFilteredOrderedIterator.prototype.get instancesCount):
(WebInspector.HeapSnapshotFilteredOrderedIterator.prototype.next):
(WebInspector.HeapSnapshotFilteredOrderedIterator.prototype.resetInstancesCount):
(WebInspector.HeapSnapshotEdgesProvider):
(WebInspector.HeapSnapshotNodesProvider):
* inspector/front-end/PleaseWaitMessage.js:
(WebInspector.PleaseWaitMessage.prototype.get instance):
* inspector/front-end/WebKit.qrc:
* inspector/front-end/inspector.html:
2011-02-16 Sheriff Bot <webkit.review.bot@gmail.com>
 
Unreviewed, rolling out r78655.
......@@ -4675,6 +4675,7 @@
'inspector/front-end/DatabaseTableView.js',
'inspector/front-end/DataGrid.js',
'inspector/front-end/DebuggerModel.js',
'inspector/front-end/DetailedHeapshotGridNodes.js',
'inspector/front-end/DetailedHeapshotView.js',
'inspector/front-end/DOMAgent.js',
'inspector/front-end/DOMStorage.js',
......
......@@ -65728,6 +65728,10 @@
RelativePath="..\inspector\front-end\DebuggerModel.js"
>
</File>
<File
RelativePath="..\inspector\front-end\DetailedHeapshotGridNodes.js"
>
</File>
<File
RelativePath="..\inspector\front-end\DetailedHeapshotView.js"
>
......@@ -552,14 +552,14 @@ WebInspector.HeapSnapshot.prototype = {
}
};
WebInspector.HeapSnapshotFilteredOrderedIterator = function(snapshot, iterator, filter)
WebInspector.HeapSnapshotFilteredOrderedIterator = function(iterator, filter)
{
this._snapshot = snapshot;
this._filter = filter;
this._iterator = iterator;
this._iterationOrder = null;
this._position = 0;
this._lastComparator = null;
this._instancesCount = 0;
}
WebInspector.HeapSnapshotFilteredOrderedIterator.prototype = {
......@@ -588,6 +588,16 @@ WebInspector.HeapSnapshotFilteredOrderedIterator.prototype = {
return this._position < this._iterationOrder.length;
},
incInstancesCount: function()
{
++this._instancesCount;
},
get instancesCount()
{
return this._instancesCount;
},
get isEmpty()
{
if (this._iterationOrder)
......@@ -623,6 +633,11 @@ WebInspector.HeapSnapshotFilteredOrderedIterator.prototype = {
next: function()
{
++this._position;
},
resetInstancesCount: function()
{
this._instancesCount = 0;
}
}
......@@ -633,7 +648,8 @@ WebInspector.HeapSnapshotFilteredOrderedIterator.prototype.createComparator = fu
WebInspector.HeapSnapshotEdgesProvider = function(snapshot, rawEdges, filter)
{
WebInspector.HeapSnapshotFilteredOrderedIterator.call(this, snapshot, new WebInspector.HeapSnapshotEdgeIterator(new WebInspector.HeapSnapshotEdge(snapshot, rawEdges)), filter);
this.snapshot = snapshot;
WebInspector.HeapSnapshotFilteredOrderedIterator.call(this, new WebInspector.HeapSnapshotEdgeIterator(new WebInspector.HeapSnapshotEdge(snapshot, rawEdges)), filter);
}
WebInspector.HeapSnapshotEdgesProvider.prototype = {
......@@ -649,8 +665,8 @@ WebInspector.HeapSnapshotEdgesProvider.prototype = {
var edgeA = this._iterator.item.clone();
var edgeB = edgeA.clone();
var nodeA = new WebInspector.HeapSnapshotNode(this._snapshot);
var nodeB = new WebInspector.HeapSnapshotNode(this._snapshot);
var nodeA = new WebInspector.HeapSnapshotNode(this.snapshot);
var nodeB = new WebInspector.HeapSnapshotNode(this.snapshot);
function sortByEdgeFieldName(ascending, indexA, indexB)
{
......@@ -715,7 +731,8 @@ WebInspector.HeapSnapshotEdgesProvider.prototype.__proto__ = WebInspector.HeapSn
WebInspector.HeapSnapshotNodesProvider = function(snapshot, nodes, filter)
{
WebInspector.HeapSnapshotFilteredOrderedIterator.call(this, snapshot, nodes, filter);
this.snapshot = snapshot;
WebInspector.HeapSnapshotFilteredOrderedIterator.call(this, nodes, filter);
}
WebInspector.HeapSnapshotNodesProvider.prototype = {
......@@ -729,8 +746,8 @@ WebInspector.HeapSnapshotNodesProvider.prototype = {
var ascending1 = comparator.ascending1;
var ascending2 = comparator.ascending2;
var nodeA = new WebInspector.HeapSnapshotNode(this._snapshot);
var nodeB = new WebInspector.HeapSnapshotNode(this._snapshot);
var nodeA = new WebInspector.HeapSnapshotNode(this.snapshot);
var nodeB = new WebInspector.HeapSnapshotNode(this.snapshot);
function sortByNodeField(fieldName, ascending, indexA, indexB)
{
......
......@@ -59,7 +59,7 @@ WebInspector.PleaseWaitMessage.prototype = {
get instance()
{
if (!"_instance" in WebInspector.PleaseWaitMessage.prototype)
if (!("_instance" in WebInspector.PleaseWaitMessage.prototype))
WebInspector.PleaseWaitMessage.prototype._instance = new WebInspector.PleaseWaitMessage();
return WebInspector.PleaseWaitMessage.prototype._instance;
},
......
......@@ -27,6 +27,7 @@
<file>Database.js</file>
<file>DatabaseQueryView.js</file>
<file>DatabaseTableView.js</file>
<file>DetailedHeapshotGridNodes.js</file>
<file>DetailedHeapshotView.js</file>
<file>DataGrid.js</file>
<file>DebuggerModel.js</file>
......
......@@ -142,6 +142,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<script type="text/javascript" src="ProfileView.js"></script>
<script type="text/javascript" src="HeapSnapshot.js"></script>
<script type="text/javascript" src="HeapSnapshotView.js"></script>
<script type="text/javascript" src="DetailedHeapshotGridNodes.js"></script>
<script type="text/javascript" src="DetailedHeapshotView.js"></script>
<script type="text/javascript" src="DebuggerModel.js"></script>
<script type="text/javascript" src="DOMAgent.js"></script>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment