diff options
Diffstat (limited to 'WebCore/inspector/front-end/ProfilesPanel.js')
-rw-r--r-- | WebCore/inspector/front-end/ProfilesPanel.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/WebCore/inspector/front-end/ProfilesPanel.js b/WebCore/inspector/front-end/ProfilesPanel.js index 0aa4174..50795e8 100644 --- a/WebCore/inspector/front-end/ProfilesPanel.js +++ b/WebCore/inspector/front-end/ProfilesPanel.js @@ -123,6 +123,7 @@ WebInspector.ProfilesPanel = function() this._profiles = []; this._profilerEnabled = Preferences.profilerAlwaysEnabled; + this._tempHeapSnapshots = []; this._reset(); } @@ -411,6 +412,25 @@ WebInspector.ProfilesPanel.prototype = { } }, + 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); |