| Index: third_party/WebKit/Source/platform/v8_inspector/V8InspectorSessionImpl.cpp
|
| diff --git a/third_party/WebKit/Source/platform/v8_inspector/V8InspectorSessionImpl.cpp b/third_party/WebKit/Source/platform/v8_inspector/V8InspectorSessionImpl.cpp
|
| index 8856807ec7da2871575e7b9589bf1e768a042ad4..91217f4052d867d0a52eb45d8c5beedf4ebe93f2 100644
|
| --- a/third_party/WebKit/Source/platform/v8_inspector/V8InspectorSessionImpl.cpp
|
| +++ b/third_party/WebKit/Source/platform/v8_inspector/V8InspectorSessionImpl.cpp
|
| @@ -26,8 +26,10 @@ PassOwnPtr<V8InspectorSessionImpl> V8InspectorSessionImpl::create(V8DebuggerImpl
|
| V8InspectorSessionImpl::V8InspectorSessionImpl(V8DebuggerImpl* debugger, int contextGroupId)
|
| : m_contextGroupId(contextGroupId)
|
| , m_debugger(debugger)
|
| + , m_client(nullptr)
|
| , m_injectedScriptHost(InjectedScriptHost::create(debugger, this))
|
| , m_customObjectFormatterEnabled(false)
|
| + , m_instrumentationCounter(0)
|
| , m_runtimeAgent(adoptPtr(new V8RuntimeAgentImpl(this)))
|
| , m_debuggerAgent(adoptPtr(new V8DebuggerAgentImpl(this)))
|
| , m_heapProfilerAgent(adoptPtr(new V8HeapProfilerAgentImpl(this)))
|
| @@ -62,6 +64,11 @@ V8RuntimeAgent* V8InspectorSessionImpl::runtimeAgent()
|
| return m_runtimeAgent.get();
|
| }
|
|
|
| +void V8InspectorSessionImpl::setClient(V8InspectorSessionClient* client)
|
| +{
|
| + m_client = client;
|
| +}
|
| +
|
| void V8InspectorSessionImpl::reset()
|
| {
|
| m_debuggerAgent->reset();
|
| @@ -163,4 +170,14 @@ void V8InspectorSessionImpl::reportAllContexts(V8RuntimeAgentImpl* agent)
|
| agent->reportExecutionContextCreated(idContext.second);
|
| }
|
|
|
| +void V8InspectorSessionImpl::changeInstrumentationCounter(int delta)
|
| +{
|
| + ASSERT(m_instrumentationCounter + delta >= 0);
|
| + if (!m_instrumentationCounter && m_client)
|
| + m_client->startInstrumenting();
|
| + m_instrumentationCounter += delta;
|
| + if (!m_instrumentationCounter && m_client)
|
| + m_client->stopInstrumenting();
|
| +}
|
| +
|
| } // namespace blink
|
|
|