| 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/V8DebuggerImpl.h" | 7 #include "platform/v8_inspector/V8DebuggerImpl.h" |
| 8 #include "platform/v8_inspector/V8StackTraceImpl.h" | 8 #include "platform/v8_inspector/V8StackTraceImpl.h" |
| 9 #include "platform/v8_inspector/V8StringUtil.h" | 9 #include "platform/v8_inspector/V8StringUtil.h" |
| 10 #include "wtf/Atomics.h" | 10 #include "wtf/Atomics.h" |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 { | 206 { |
| 207 ErrorString error; | 207 ErrorString error; |
| 208 disable(&error); | 208 disable(&error); |
| 209 ASSERT(m_frontend); | 209 ASSERT(m_frontend); |
| 210 m_frontend = nullptr; | 210 m_frontend = nullptr; |
| 211 } | 211 } |
| 212 | 212 |
| 213 void V8ProfilerAgentImpl::restore() | 213 void V8ProfilerAgentImpl::restore() |
| 214 { | 214 { |
| 215 m_enabled = true; | 215 m_enabled = true; |
| 216 long interval = 0; | 216 int interval = 0; |
| 217 m_state->getNumber(ProfilerAgentState::samplingInterval, &interval); | 217 m_state->getNumber(ProfilerAgentState::samplingInterval, &interval); |
| 218 if (interval) | 218 if (interval) |
| 219 m_isolate->GetCpuProfiler()->SetSamplingInterval(interval); | 219 m_isolate->GetCpuProfiler()->SetSamplingInterval(interval); |
| 220 if (m_state->booleanProperty(ProfilerAgentState::userInitiatedProfiling, fal
se)) { | 220 if (m_state->booleanProperty(ProfilerAgentState::userInitiatedProfiling, fal
se)) { |
| 221 ErrorString error; | 221 ErrorString error; |
| 222 start(&error); | 222 start(&error); |
| 223 } | 223 } |
| 224 } | 224 } |
| 225 | 225 |
| 226 void V8ProfilerAgentImpl::start(ErrorString* error) | 226 void V8ProfilerAgentImpl::start(ErrorString* error) |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 } | 292 } |
| 293 | 293 |
| 294 void V8ProfilerAgentImpl::idleStarted() | 294 void V8ProfilerAgentImpl::idleStarted() |
| 295 { | 295 { |
| 296 if (!isRecording()) | 296 if (!isRecording()) |
| 297 return; | 297 return; |
| 298 m_isolate->GetCpuProfiler()->SetIdle(true); | 298 m_isolate->GetCpuProfiler()->SetIdle(true); |
| 299 } | 299 } |
| 300 | 300 |
| 301 } // namespace blink | 301 } // namespace blink |
| OLD | NEW |