OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 1207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1218 /** | 1218 /** |
1219 * @param {?string} error | 1219 * @param {?string} error |
1220 * @this {WebInspector.HeapSnapshotProfileType} | 1220 * @this {WebInspector.HeapSnapshotProfileType} |
1221 */ | 1221 */ |
1222 function didTakeHeapSnapshot(error) | 1222 function didTakeHeapSnapshot(error) |
1223 { | 1223 { |
1224 var profile = this._profileBeingRecorded; | 1224 var profile = this._profileBeingRecorded; |
1225 profile.title = WebInspector.UIString("Snapshot %d", profile.uid); | 1225 profile.title = WebInspector.UIString("Snapshot %d", profile.uid); |
1226 profile._finishLoad(); | 1226 profile._finishLoad(); |
1227 this._profileBeingRecorded = null; | 1227 this._profileBeingRecorded = null; |
1228 WebInspector.panels.profiles.showProfile(profile); | 1228 WebInspector.inspectorView.panel("profiles").showProfile(profile); |
1229 callback(); | 1229 callback(); |
1230 } | 1230 } |
1231 HeapProfilerAgent.takeHeapSnapshot(true, didTakeHeapSnapshot.bind(this))
; | 1231 HeapProfilerAgent.takeHeapSnapshot(true, didTakeHeapSnapshot.bind(this))
; |
1232 }, | 1232 }, |
1233 | 1233 |
1234 /** | 1234 /** |
1235 * @override | 1235 * @override |
1236 * @param {string} chunk | 1236 * @param {string} chunk |
1237 */ | 1237 */ |
1238 addHeapSnapshotChunk: function(chunk) | 1238 addHeapSnapshotChunk: function(chunk) |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1407 function didTakeHeapSnapshot(error) | 1407 function didTakeHeapSnapshot(error) |
1408 { | 1408 { |
1409 var target = /** @type {!WebInspector.Target} */ (WebInspector.targe
tManager.activeTarget()); | 1409 var target = /** @type {!WebInspector.Target} */ (WebInspector.targe
tManager.activeTarget()); |
1410 target.profilingLock.release(); | 1410 target.profilingLock.release(); |
1411 var profile = this._profileBeingRecorded; | 1411 var profile = this._profileBeingRecorded; |
1412 if (!profile) | 1412 if (!profile) |
1413 return; | 1413 return; |
1414 profile._finishLoad(); | 1414 profile._finishLoad(); |
1415 this._profileSamples = null; | 1415 this._profileSamples = null; |
1416 this._profileBeingRecorded = null; | 1416 this._profileBeingRecorded = null; |
1417 WebInspector.panels.profiles.showProfile(profile); | 1417 WebInspector.inspectorView.panel("profiles").showProfile(profile); |
1418 } | 1418 } |
1419 | 1419 |
1420 HeapProfilerAgent.stopTrackingHeapObjects(true, didTakeHeapSnapshot.bind
(this)); | 1420 HeapProfilerAgent.stopTrackingHeapObjects(true, didTakeHeapSnapshot.bind
(this)); |
1421 this._recording = false; | 1421 this._recording = false; |
1422 this.dispatchEventToListeners(WebInspector.TrackingHeapSnapshotProfileTy
pe.TrackingStopped); | 1422 this.dispatchEventToListeners(WebInspector.TrackingHeapSnapshotProfileTy
pe.TrackingStopped); |
1423 }, | 1423 }, |
1424 | 1424 |
1425 _toggleRecording: function() | 1425 _toggleRecording: function() |
1426 { | 1426 { |
1427 if (this._recording) | 1427 if (this._recording) |
(...skipping 842 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2270 urlElement = this._linkifier.linkifyRawLocation(rawLocation)
; | 2270 urlElement = this._linkifier.linkifyRawLocation(rawLocation)
; |
2271 if (!urlElement) | 2271 if (!urlElement) |
2272 urlElement = this._linkifier.linkifyLocation(this._target, f
rame.scriptName, frame.line - 1, frame.column - 1); | 2272 urlElement = this._linkifier.linkifyLocation(this._target, f
rame.scriptName, frame.line - 1, frame.column - 1); |
2273 frameDiv.appendChild(urlElement); | 2273 frameDiv.appendChild(urlElement); |
2274 } | 2274 } |
2275 } | 2275 } |
2276 }, | 2276 }, |
2277 | 2277 |
2278 __proto__: WebInspector.View.prototype | 2278 __proto__: WebInspector.View.prototype |
2279 } | 2279 } |
OLD | NEW |