| Index: third_party/WebKit/Source/platform/v8_inspector/V8ProfilerAgentImpl.cpp
|
| diff --git a/third_party/WebKit/Source/platform/v8_inspector/V8ProfilerAgentImpl.cpp b/third_party/WebKit/Source/platform/v8_inspector/V8ProfilerAgentImpl.cpp
|
| index 3bb1e05c19a1dfabb642250f3a76be315c989fed..0e2a7630a73cf7d1e3a994a05149273c035a9496 100644
|
| --- a/third_party/WebKit/Source/platform/v8_inspector/V8ProfilerAgentImpl.cpp
|
| +++ b/third_party/WebKit/Source/platform/v8_inspector/V8ProfilerAgentImpl.cpp
|
| @@ -16,6 +16,7 @@ namespace blink {
|
| namespace ProfilerAgentState {
|
| static const char samplingInterval[] = "samplingInterval";
|
| static const char userInitiatedProfiling[] = "userInitiatedProfiling";
|
| +static const char profilerEnabled[] = "profilerEnabled";
|
| }
|
|
|
| namespace {
|
| @@ -183,6 +184,7 @@ void V8ProfilerAgentImpl::enable(ErrorString*)
|
| if (m_enabled)
|
| return;
|
| m_enabled = true;
|
| + m_state->setBoolean(ProfilerAgentState::profilerEnabled, true);
|
| m_session->changeInstrumentationCounter(+1);
|
| }
|
|
|
| @@ -196,6 +198,7 @@ void V8ProfilerAgentImpl::disable(ErrorString* errorString)
|
| m_startedProfiles.clear();
|
| stop(nullptr, nullptr);
|
| m_enabled = false;
|
| + m_state->setBoolean(ProfilerAgentState::profilerEnabled, false);
|
| }
|
|
|
| void V8ProfilerAgentImpl::setSamplingInterval(ErrorString* error, int interval)
|
| @@ -219,6 +222,8 @@ void V8ProfilerAgentImpl::clearFrontend()
|
| void V8ProfilerAgentImpl::restore()
|
| {
|
| ASSERT(!m_enabled);
|
| + if (!m_state->booleanProperty(ProfilerAgentState::profilerEnabled, false))
|
| + return;
|
| m_enabled = true;
|
| m_session->changeInstrumentationCounter(+1);
|
| int interval = 0;
|
|
|