| 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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 result = createCPUProfile(m_isolate, profile); | 285 result = createCPUProfile(m_isolate, profile); |
| 286 profile->Delete(); | 286 profile->Delete(); |
| 287 return result.release(); | 287 return result.release(); |
| 288 } | 288 } |
| 289 | 289 |
| 290 bool V8ProfilerAgentImpl::isRecording() const | 290 bool V8ProfilerAgentImpl::isRecording() const |
| 291 { | 291 { |
| 292 return m_recordingCPUProfile || !m_startedProfiles.isEmpty(); | 292 return m_recordingCPUProfile || !m_startedProfiles.isEmpty(); |
| 293 } | 293 } |
| 294 | 294 |
| 295 void V8ProfilerAgentImpl::idleFinished() | |
| 296 { | |
| 297 if (!isRecording()) | |
| 298 return; | |
| 299 m_isolate->GetCpuProfiler()->SetIdle(false); | |
| 300 } | |
| 301 | |
| 302 void V8ProfilerAgentImpl::idleStarted() | |
| 303 { | |
| 304 if (!isRecording()) | |
| 305 return; | |
| 306 m_isolate->GetCpuProfiler()->SetIdle(true); | |
| 307 } | |
| 308 | |
| 309 } // namespace blink | 295 } // namespace blink |
| OLD | NEW |