Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2159)

Unified Diff: Source/devtools/front_end/HeapSnapshotView.js

Issue 27000005: Remove HeapProfiler.finishHeapSnapshot event from remote debugging protocol (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed heap profiler test Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/devtools/front_end/CPUProfileView.js ('k') | Source/devtools/protocol.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/HeapSnapshotView.js
diff --git a/Source/devtools/front_end/HeapSnapshotView.js b/Source/devtools/front_end/HeapSnapshotView.js
index 3604a6ceae124a561f48047ef93c83d7829a566a..84ed9875026d93ad2d7d88dd11b269108c646bf2 100644
--- a/Source/devtools/front_end/HeapSnapshotView.js
+++ b/Source/devtools/front_end/HeapSnapshotView.js
@@ -761,15 +761,6 @@ WebInspector.HeapProfilerDispatcher.prototype = {
/**
* @override
- * @param {number} uid
- */
- finishHeapSnapshot: function(uid)
- {
- this._genericCaller("finishHeapSnapshot");
- },
-
- /**
- * @override
* @param {number} done
* @param {number} total
*/
@@ -921,17 +912,6 @@ WebInspector.HeapSnapshotProfileType.prototype = {
/**
* @override
- * @param {number} uid
- */
- finishHeapSnapshot: function(uid)
- {
- var profile = this._profilesIdMap[this._makeKey(uid)];
- if (profile)
- profile.finishHeapSnapshot();
- },
-
- /**
- * @override
* @param {number} done
* @param {number} total
*/
@@ -1194,15 +1174,22 @@ WebInspector.HeapProfileHeader.prototype = {
this._transferHandler = new WebInspector.BackendSnapshotLoader(this);
this.sidebarElement.subtitle = WebInspector.UIString("Loading\u2026");
this.sidebarElement.wait = true;
- this.startSnapshotTransfer();
+ this._transferSnapshot();
}
var loaderProxy = /** @type {WebInspector.HeapSnapshotLoaderProxy} */ (this._receiver);
loaderProxy.addConsumer(callback);
},
- startSnapshotTransfer: function()
+ _transferSnapshot: function()
{
- HeapProfilerAgent.getHeapSnapshot(this.uid);
+ function finishTransfer()
+ {
+ if (this._transferHandler) {
+ this._transferHandler.finishTransfer();
+ this._totalNumberOfChunks = this._transferHandler._totalNumberOfChunks;
+ }
+ }
+ HeapProfilerAgent.getHeapSnapshot(this.uid, finishTransfer.bind(this));
},
snapshotConstructorName: function()
@@ -1299,14 +1286,6 @@ WebInspector.HeapProfileHeader.prototype = {
this._profileType._snapshotReceived(this);
},
- finishHeapSnapshot: function()
- {
- if (this._transferHandler) {
- this._transferHandler.finishTransfer();
- this._totalNumberOfChunks = this._transferHandler._totalNumberOfChunks;
- }
- },
-
// Hook point for tests.
_wasShown: function()
{
@@ -1331,7 +1310,7 @@ WebInspector.HeapProfileHeader.prototype = {
{
this._receiver = fileOutputStream;
this._transferHandler = new WebInspector.SaveSnapshotHandler(this);
- HeapProfilerAgent.getHeapSnapshot(this.uid);
+ this._transferSnapshot();
}
this._fileName = this._fileName || "Heap-" + new Date().toISO8601Compact() + this._profileType.fileExtension();
fileOutputStream.open(this._fileName, onOpen.bind(this));
« no previous file with comments | « Source/devtools/front_end/CPUProfileView.js ('k') | Source/devtools/protocol.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698