diff options
Diffstat (limited to 'deps/v8/src/inspector/injected-script.cc')
-rw-r--r-- | deps/v8/src/inspector/injected-script.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/deps/v8/src/inspector/injected-script.cc b/deps/v8/src/inspector/injected-script.cc index a5e981cda5..d13e5f8695 100644 --- a/deps/v8/src/inspector/injected-script.cc +++ b/deps/v8/src/inspector/injected-script.cc @@ -49,6 +49,7 @@ namespace v8_inspector { namespace { static const char privateKeyName[] = "v8-inspector#injectedScript"; +static const char kGlobalHandleLabel[] = "DevTools console"; } // namespace using protocol::Array; @@ -511,6 +512,7 @@ v8::Local<v8::Value> InjectedScript::lastEvaluationResult() const { void InjectedScript::setLastEvaluationResult(v8::Local<v8::Value> result) { m_lastEvaluationResult.Reset(m_context->isolate(), result); + m_lastEvaluationResult.AnnotateStrongRetainer(kGlobalHandleLabel); } Response InjectedScript::resolveCallArgument( @@ -601,8 +603,10 @@ Response InjectedScript::wrapEvaluateResult( Response response = wrapObject(resultValue, objectGroup, returnByValue, generatePreview, result); if (!response.isSuccess()) return response; - if (objectGroup == "console") + if (objectGroup == "console") { m_lastEvaluationResult.Reset(m_context->isolate(), resultValue); + m_lastEvaluationResult.AnnotateStrongRetainer(kGlobalHandleLabel); + } } else { v8::Local<v8::Value> exception = tryCatch.Exception(); Response response = @@ -624,6 +628,7 @@ v8::Local<v8::Object> InjectedScript::commandLineAPI() { m_context->isolate(), m_context->inspector()->console()->createCommandLineAPI( m_context->context(), m_sessionId)); + m_commandLineAPI.AnnotateStrongRetainer(kGlobalHandleLabel); } return m_commandLineAPI.Get(m_context->isolate()); } @@ -769,6 +774,7 @@ int InjectedScript::bindObject(v8::Local<v8::Value> value, if (m_lastBoundObjectId <= 0) m_lastBoundObjectId = 1; int id = m_lastBoundObjectId++; m_idToWrappedObject[id].Reset(m_context->isolate(), value); + m_idToWrappedObject[id].AnnotateStrongRetainer(kGlobalHandleLabel); if (!groupName.isEmpty() && id > 0) { m_idToObjectGroupName[id] = groupName; |