Chromium Code Reviews| Index: Source/devtools/front_end/profiler/CanvasProfileView.js |
| diff --git a/Source/devtools/front_end/profiler/CanvasProfileView.js b/Source/devtools/front_end/profiler/CanvasProfileView.js |
| index 03f5f8f5530cca12f24820c60c3bb0868ed82566..c41069bea8771268e5fed7ac878d91a943b592fa 100644 |
| --- a/Source/devtools/front_end/profiler/CanvasProfileView.js |
| +++ b/Source/devtools/front_end/profiler/CanvasProfileView.js |
| @@ -726,22 +726,22 @@ WebInspector.CanvasProfileType.prototype = { |
| _runSingleFrameCapturing: function() |
| { |
| var frameId = this._selectedFrameId(); |
| - WebInspector.profilingLock().acquire(); |
| + WebInspector.targetManager.suspendAllTargets(); |
|
yurys
2014/10/15 14:07:34
Do we really need this call here?
loislo
2014/10/15 15:38:47
aandrey@ knows why it is needed.
aandrey
2014/10/15 18:14:06
It may take some time to capture a single frame to
|
| CanvasAgent.captureFrame(frameId, this._didStartCapturingFrame.bind(this, frameId)); |
| - WebInspector.profilingLock().release(); |
| + WebInspector.targetManager.resumeAllTargets(); |
| }, |
| _startFrameCapturing: function() |
| { |
| var frameId = this._selectedFrameId(); |
| - WebInspector.profilingLock().acquire(); |
| + WebInspector.targetManager.suspendAllTargets(); |
|
aandrey
2014/10/15 18:14:06
This name is misleading. You don't really *suspend
loislo
2014/10/16 09:08:22
It depends what you mean under name Target.
aandrey
2014/10/16 09:49:41
AFAIU, you disable few agents that may affect prof
|
| CanvasAgent.startCapturing(frameId, this._didStartCapturingFrame.bind(this, frameId)); |
| }, |
| _stopFrameCapturing: function() |
| { |
| if (!this._lastProfileHeader) { |
| - WebInspector.profilingLock().release(); |
| + WebInspector.targetManager.resumeAllTargets(); |
| return; |
| } |
| var profileHeader = this._lastProfileHeader; |
| @@ -752,7 +752,7 @@ WebInspector.CanvasProfileType.prototype = { |
| profileHeader._updateCapturingStatus(); |
| } |
| CanvasAgent.stopCapturing(traceLogId, didStopCapturing); |
| - WebInspector.profilingLock().release(); |
| + WebInspector.targetManager.resumeAllTargets(); |
| }, |
| /** |