OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "platform/v8_inspector/V8ProfilerAgentImpl.h" | 5 #include "platform/v8_inspector/V8ProfilerAgentImpl.h" |
6 | 6 |
7 #include "platform/v8_inspector/Atomics.h" | 7 #include "platform/v8_inspector/Atomics.h" |
8 #include "platform/v8_inspector/V8DebuggerImpl.h" | 8 #include "platform/v8_inspector/V8DebuggerImpl.h" |
9 #include "platform/v8_inspector/V8InspectorSessionImpl.h" | 9 #include "platform/v8_inspector/V8InspectorSessionImpl.h" |
10 #include "platform/v8_inspector/V8StackTraceImpl.h" | 10 #include "platform/v8_inspector/V8StackTraceImpl.h" |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 result = createCPUProfile(m_isolate, profile); | 283 result = createCPUProfile(m_isolate, profile); |
284 profile->Delete(); | 284 profile->Delete(); |
285 return result.release(); | 285 return result.release(); |
286 } | 286 } |
287 | 287 |
288 bool V8ProfilerAgentImpl::isRecording() const | 288 bool V8ProfilerAgentImpl::isRecording() const |
289 { | 289 { |
290 return m_recordingCPUProfile || !m_startedProfiles.isEmpty(); | 290 return m_recordingCPUProfile || !m_startedProfiles.isEmpty(); |
291 } | 291 } |
292 | 292 |
293 void V8ProfilerAgentImpl::idleFinished() | |
294 { | |
295 if (!isRecording()) | |
296 return; | |
297 m_isolate->GetCpuProfiler()->SetIdle(false); | |
298 } | |
299 | |
300 void V8ProfilerAgentImpl::idleStarted() | |
301 { | |
302 if (!isRecording()) | |
303 return; | |
304 m_isolate->GetCpuProfiler()->SetIdle(true); | |
305 } | |
306 | |
307 } // namespace blink | 293 } // namespace blink |
OLD | NEW |