| Index: third_party/WebKit/Source/platform/v8_inspector/V8RuntimeAgentImpl.cpp
|
| diff --git a/third_party/WebKit/Source/platform/v8_inspector/V8RuntimeAgentImpl.cpp b/third_party/WebKit/Source/platform/v8_inspector/V8RuntimeAgentImpl.cpp
|
| index 40f7be1b63f0329358d40423f7876c92759e7fbf..4187fb272afad37b539989e78c7e937b159d0c2c 100644
|
| --- a/third_party/WebKit/Source/platform/v8_inspector/V8RuntimeAgentImpl.cpp
|
| +++ b/third_party/WebKit/Source/platform/v8_inspector/V8RuntimeAgentImpl.cpp
|
| @@ -423,12 +423,22 @@ v8::Local<v8::Value> V8RuntimeAgentImpl::findObject(ErrorString* errorString, co
|
|
|
| void V8RuntimeAgentImpl::addInspectedObject(PassOwnPtr<Inspectable> inspectable)
|
| {
|
| - m_session->addInspectedObject(inspectable);
|
| + m_inspectedObjects.prepend(inspectable);
|
| + while (m_inspectedObjects.size() > inspectedObjectBufferSize)
|
| + m_inspectedObjects.removeLast();
|
| +}
|
| +
|
| +V8RuntimeAgent::Inspectable* V8RuntimeAgentImpl::inspectedObject(unsigned num)
|
| +{
|
| + if (num >= m_inspectedObjects.size())
|
| + return nullptr;
|
| + return m_inspectedObjects[num].get();
|
| }
|
|
|
| void V8RuntimeAgentImpl::reset()
|
| {
|
| m_compiledScripts.clear();
|
| + m_inspectedObjects.clear();
|
| if (m_enabled) {
|
| if (const V8DebuggerImpl::ContextByIdMap* contexts = m_debugger->contextGroup(m_session->contextGroupId())) {
|
| for (auto& idContext : *contexts)
|
|
|