this._profiles = [];
this._profilerEnabled = Preferences.profilerAlwaysEnabled;
+ this._tempHeapSnapshots = [];
this._reset();
}
}
},
+ addHeapSnapshotChunk: function(uid, chunk)
+ {
+ if (this._tempHeapSnapshots[uid])
+ this._tempHeapSnapshots[uid] += chunk;
+ else
+ this._tempHeapSnapshots[uid] = chunk;
+ },
+
+ finishHeapSnapshot: function(uid)
+ {
+ var profile =
+ this._profilesIdMap[this._makeKey(uid, WebInspector.HeapSnapshotProfileType.TypeId)];
+ if (profile) {
+ var view = profile.__profilesPanelProfileType.viewForProfile(profile);
+ view.snapshotLoaded(uid, JSON.parse(this._tempHeapSnapshots[uid]));
+ }
+ delete this._tempHeapSnapshots[uid];
+ },
+
showView: function(view)
{
this.showProfile(view.profile);