Chromium Code Reviews| Index: third_party/WebKit/Source/platform/v8_inspector/InjectedScript.cpp |
| diff --git a/third_party/WebKit/Source/platform/v8_inspector/InjectedScript.cpp b/third_party/WebKit/Source/platform/v8_inspector/InjectedScript.cpp |
| index 1119b267c79109ba68beec73a5af5435a2bc948f..41ef5e4fedacfbdf90dbe0184edc73565754dcbc 100644 |
| --- a/third_party/WebKit/Source/platform/v8_inspector/InjectedScript.cpp |
| +++ b/third_party/WebKit/Source/platform/v8_inspector/InjectedScript.cpp |
| @@ -39,6 +39,7 @@ |
| #include "platform/v8_inspector/InspectedContext.h" |
| #include "platform/v8_inspector/RemoteObjectId.h" |
| #include "platform/v8_inspector/V8Compat.h" |
| +#include "platform/v8_inspector/V8Console.h" |
| #include "platform/v8_inspector/V8DebuggerImpl.h" |
| #include "platform/v8_inspector/V8FunctionCall.h" |
| #include "platform/v8_inspector/V8InjectedScriptHost.h" |
| @@ -409,7 +410,8 @@ bool InjectedScript::Scope::initialize() |
| bool InjectedScript::Scope::installCommandLineAPI() |
| { |
| ASSERT(m_injectedScript && !m_context.IsEmpty()); |
| - V8FunctionCall function(m_debugger, m_context, m_injectedScript->v8Value(), "commandLineAPI"); |
| + V8FunctionCall function(m_debugger, m_context, m_injectedScript->v8Value(), "installCommandLineAPI"); |
| + function.appendArgument(V8Console::createCommandLineAPI(m_context, m_injectedScript->context())); |
|
dgozman
2016/04/25 18:09:50
InspectedContext is enough to pass.
kozy
2016/04/25 19:31:06
Done.
|
| v8::Local<v8::Object> extensionObject; |
| if (!installGlobalObjectExtension(function).ToLocal(&extensionObject)) |
| return false; |
| @@ -435,9 +437,9 @@ v8::MaybeLocal<v8::Object> InjectedScript::Scope::installGlobalObjectExtension(V |
| } |
| ASSERT(m_global.IsEmpty()); |
| - m_extensionSymbol = V8Debugger::scopeExtensionSymbol(m_debugger->isolate()); |
| + m_extensionPrivate = V8Debugger::scopeExtensionPrivate(m_debugger->isolate()); |
| v8::Local<v8::Object> global = m_context->Global(); |
| - if (!global->Set(m_context, m_extensionSymbol, extension).FromMaybe(false)) { |
| + if (!global->SetPrivate(m_context, m_extensionPrivate, extension).FromMaybe(false)) { |
| *m_errorString = "Internal error"; |
| return v8::MaybeLocal<v8::Object>(); |
| } |
| @@ -469,7 +471,7 @@ void InjectedScript::Scope::cleanup() |
| v8::Local<v8::Object> global; |
| if (m_global.ToLocal(&global)) { |
| ASSERT(!m_context.IsEmpty()); |
| - global->Delete(m_context, m_extensionSymbol); |
| + global->DeletePrivate(m_context, m_extensionPrivate); |
| m_global = v8::MaybeLocal<v8::Object>(); |
| } |
| if (!m_context.IsEmpty()) { |