Diff
Modified: trunk/Source/WebCore/ChangeLog (112995 => 112996)
--- trunk/Source/WebCore/ChangeLog 2012-04-03 08:32:34 UTC (rev 112995)
+++ trunk/Source/WebCore/ChangeLog 2012-04-03 08:36:12 UTC (rev 112996)
@@ -1,3 +1,34 @@
+2012-04-03 Sheriff Bot <[email protected]>
+
+ Unreviewed, rolling out r112994.
+ http://trac.webkit.org/changeset/112994
+ https://bugs.webkit.org/show_bug.cgi?id=83008
+
+ This patch has to wait until v8 roll. (Requested by loislo on
+ #webkit).
+
+ * bindings/js/ScriptHeapSnapshot.h:
+ * bindings/v8/ScriptHeapSnapshot.cpp:
+ (WebCore):
+ * bindings/v8/ScriptHeapSnapshot.h:
+ (WebCore):
+ (ScriptHeapSnapshot):
+ * inspector/InspectorProfilerAgent.cpp:
+ (WebCore::InspectorProfilerAgent::createSnapshotHeader):
+ * inspector/front-end/DetailedHeapshotView.js:
+ (WebInspector.HeapSnapshotConstructorsDataGrid):
+ (WebInspector.HeapSnapshotConstructorsDataGrid.prototype.setDataSource):
+ (WebInspector.HeapSnapshotConstructorsDataGrid.prototype.populateChildren):
+ (WebInspector.HeapSnapshotConstructorsDataGrid.prototype._filterSelectIndexChanged.firstSnapshotLoaded):
+ (WebInspector.HeapSnapshotConstructorsDataGrid.prototype._filterSelectIndexChanged.secondSnapshotLoaded):
+ (WebInspector.HeapSnapshotConstructorsDataGrid.prototype._filterSelectIndexChanged):
+ (WebInspector.DetailedHeapshotView.prototype._changeFilter):
+ * inspector/front-end/HeapSnapshot.js:
+ (WebInspector.HeapSnapshot.prototype.get maxNodeId):
+ (WebInspector.HeapSnapshot.prototype.updateStaticData):
+ * inspector/front-end/HeapSnapshotProxy.js:
+ (WebInspector.HeapSnapshotProxy.prototype.get maxNodeId):
+
2012-03-28 Ilya Tikhonovsky <[email protected]>
Web Inspector: use maxJSObjectId that is provided by back-end.
Modified: trunk/Source/WebCore/bindings/js/ScriptHeapSnapshot.h (112995 => 112996)
--- trunk/Source/WebCore/bindings/js/ScriptHeapSnapshot.h 2012-04-03 08:32:34 UTC (rev 112995)
+++ trunk/Source/WebCore/bindings/js/ScriptHeapSnapshot.h 2012-04-03 08:36:12 UTC (rev 112996)
@@ -36,8 +36,6 @@
namespace WebCore {
-typedef uint32_t SnapshotObjectId;
-
class ScriptHeapSnapshot : public RefCounted<ScriptHeapSnapshot> {
public:
class OutputStream {
@@ -53,7 +51,6 @@
unsigned int uid() const { return 0; }
void writeJSON(OutputStream*) { }
- SnapshotObjectId maxSnapshotJSObjectId() const { return 0; }
private:
ScriptHeapSnapshot() { }
Modified: trunk/Source/WebCore/bindings/v8/ScriptHeapSnapshot.cpp (112995 => 112996)
--- trunk/Source/WebCore/bindings/v8/ScriptHeapSnapshot.cpp 2012-04-03 08:32:34 UTC (rev 112995)
+++ trunk/Source/WebCore/bindings/v8/ScriptHeapSnapshot.cpp 2012-04-03 08:36:12 UTC (rev 112996)
@@ -56,11 +56,6 @@
return m_snapshot->GetUid();
}
-SnapshotObjectId ScriptHeapSnapshot::maxSnapshotJSObjectId() const
-{
- return m_snapshot->GetMaxSnapshotJSObjectId();
-}
-
namespace {
class OutputStreamAdapter : public v8::OutputStream {
Modified: trunk/Source/WebCore/bindings/v8/ScriptHeapSnapshot.h (112995 => 112996)
--- trunk/Source/WebCore/bindings/v8/ScriptHeapSnapshot.h 2012-04-03 08:32:34 UTC (rev 112995)
+++ trunk/Source/WebCore/bindings/v8/ScriptHeapSnapshot.h 2012-04-03 08:36:12 UTC (rev 112996)
@@ -41,7 +41,6 @@
namespace WebCore {
class InspectorObject;
-typedef uint32_t SnapshotObjectId;
class ScriptHeapSnapshot : public RefCounted<ScriptHeapSnapshot> {
public:
@@ -61,7 +60,6 @@
String title() const;
unsigned int uid() const;
void writeJSON(OutputStream* stream);
- SnapshotObjectId maxSnapshotJSObjectId() const;
private:
ScriptHeapSnapshot(const v8::HeapSnapshot* snapshot)
Modified: trunk/Source/WebCore/inspector/InspectorProfilerAgent.cpp (112995 => 112996)
--- trunk/Source/WebCore/inspector/InspectorProfilerAgent.cpp 2012-04-03 08:32:34 UTC (rev 112995)
+++ trunk/Source/WebCore/inspector/InspectorProfilerAgent.cpp 2012-04-03 08:36:12 UTC (rev 112996)
@@ -182,7 +182,6 @@
header->setString("title", snapshot.title());
header->setNumber("uid", snapshot.uid());
header->setString("typeId", String(HeapProfileType));
- header->setNumber("maxJSObjectId", snapshot.maxSnapshotJSObjectId());
return header;
}
Modified: trunk/Source/WebCore/inspector/front-end/DetailedHeapshotView.js (112995 => 112996)
--- trunk/Source/WebCore/inspector/front-end/DetailedHeapshotView.js 2012-04-03 08:32:34 UTC (rev 112995)
+++ trunk/Source/WebCore/inspector/front-end/DetailedHeapshotView.js 2012-04-03 08:36:12 UTC (rev 112996)
@@ -225,7 +225,7 @@
retainedSize: { title: WebInspector.UIString("Retained Size"), width: "120px", sort: "descending", sortable: true }
};
WebInspector.HeapSnapshotSortableDataGrid.call(this, columns);
- this._profileIndex = -1;
+ this._filterProfileIndex = -1;
}
WebInspector.HeapSnapshotConstructorsDataGrid.prototype = {
@@ -246,7 +246,7 @@
{
this.snapshotView = snapshotView;
this.snapshot = snapshot;
- if (this._profileIndex === -1)
+ if (this._filterProfileIndex === -1)
this.populateChildren();
},
@@ -263,25 +263,42 @@
this.removeChildren();
this.resetSortingCache();
- var key = this._profileIndex === -1 ? "allObjects" : this._minNodeId + ".." + this._maxNodeId;
- var filter = this._profileIndex === -1 ? null : "function(node) { var id = node.id; return id > " + this._minNodeId + " && id <= " + this._maxNodeId + "; }";
+ var key = this._filterProfileIndex === -1 ? "allObjects" : this._minNodeId + ".." + this._maxNodeId;
+ var filter = this._filterProfileIndex === -1 ? null : "function(node) { var id = node.id; return id > " + this._minNodeId + " && id <= " + this._maxNodeId + "; }";
this.snapshot.aggregates(false, key, filter, aggregatesReceived.bind(this, key));
},
- _filterSelectIndexChanged: function(profiles, profileIndex)
+ _filterSelectIndexChanged: function(loader, profileIndex)
{
- this._profileIndex = profileIndex;
+ this._filterProfileIndex = profileIndex;
delete this._maxNodeId;
delete this._minNodeId;
- if (this._profileIndex !== -1) {
- this._minNodeId = profileIndex > 0 ? profiles[profileIndex - 1].maxJSObjectId : 0;
- this._maxNodeId = profiles[profileIndex].maxJSObjectId;
+ if (this._filterProfileIndex === -1) {
+ this.populateChildren();
+ return;
}
- this.populateChildren();
+ function firstSnapshotLoaded(snapshot)
+ {
+ this._maxNodeId = snapshot.maxNodeId;
+ if (profileIndex > 0)
+ loader(profileIndex - 1, secondSnapshotLoaded.bind(this));
+ else {
+ this._minNodeId = 0;
+ this.populateChildren();
+ }
+ }
+
+ function secondSnapshotLoaded(snapshot)
+ {
+ this._minNodeId = snapshot.maxNodeId;
+ this.populateChildren();
+ }
+
+ loader(profileIndex, firstSnapshotLoaded.bind(this));
},
};
@@ -761,7 +778,7 @@
_changeFilter: function()
{
var profileIndex = this.filterSelectElement.selectedIndex - 1;
- this.dataGrid._filterSelectIndexChanged(this._profiles(), profileIndex);
+ this.dataGrid._filterSelectIndexChanged(this._loadProfileByIndex.bind(this), profileIndex);
if (!this.currentQuery || !this._searchFinishedCallback || !this._searchResults)
return;
Modified: trunk/Source/WebCore/inspector/front-end/HeapSnapshot.js (112995 => 112996)
--- trunk/Source/WebCore/inspector/front-end/HeapSnapshot.js 2012-04-03 08:32:34 UTC (rev 112995)
+++ trunk/Source/WebCore/inspector/front-end/HeapSnapshot.js 2012-04-03 08:36:12 UTC (rev 112996)
@@ -987,6 +987,19 @@
return new WebInspector.HeapSnapshotNode(this, this._rootNodeIndex);
},
+ get maxNodeId()
+ {
+ if (typeof this._maxNodeId === "number")
+ return this._maxNodeId;
+ this._maxNodeId = 0;
+ for (var nodeIdIndex = this._nodeIdOffset; nodeIdIndex < this._onlyNodes.length; nodeIdIndex += this._nodeFieldCount) {
+ var id = this._onlyNodes[nodeIdIndex];
+ if ((id % 2) && id > this._maxNodeId)
+ this._maxNodeId = id;
+ }
+ return this._maxNodeId;
+ },
+
get rootNodeIndex()
{
return this._rootNodeIndex;
@@ -1389,7 +1402,7 @@
updateStaticData: function()
{
- return {nodeCount: this.nodeCount, rootNodeIndex: this._rootNodeIndex, totalSize: this.totalSize, uid: this.uid, nodeFlags: this._nodeFlags};
+ return {nodeCount: this.nodeCount, rootNodeIndex: this._rootNodeIndex, totalSize: this.totalSize, uid: this.uid, nodeFlags: this._nodeFlags, maxNodeId: this.maxNodeId};
}
};
Modified: trunk/Source/WebCore/inspector/front-end/HeapSnapshotProxy.js (112995 => 112996)
--- trunk/Source/WebCore/inspector/front-end/HeapSnapshotProxy.js 2012-04-03 08:32:34 UTC (rev 112995)
+++ trunk/Source/WebCore/inspector/front-end/HeapSnapshotProxy.js 2012-04-03 08:36:12 UTC (rev 112996)
@@ -369,6 +369,11 @@
return !!this._objectId;
},
+ get maxNodeId()
+ {
+ return this._staticData.maxNodeId;
+ },
+
get nodeCount()
{
return this._staticData.nodeCount;