| 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 3d9ee343044587fc2ecd1e0f04c1e2534cfdb040..ce17d2ba52e0768a30739b5fef62e23c10eb457d 100644
|
| --- a/third_party/WebKit/Source/platform/v8_inspector/InjectedScript.cpp
|
| +++ b/third_party/WebKit/Source/platform/v8_inspector/InjectedScript.cpp
|
| @@ -413,34 +413,13 @@ bool InjectedScript::Scope::initialize()
|
|
|
| bool InjectedScript::Scope::installCommandLineAPI()
|
| {
|
| - ASSERT(m_injectedScript && !m_context.IsEmpty());
|
| + DCHECK(m_injectedScript && !m_context.IsEmpty() && m_global.IsEmpty());
|
| v8::Local<v8::Object> extensionObject;
|
| if (!m_injectedScript->commandLineAPI(m_errorString).ToLocal(&extensionObject))
|
| return false;
|
| - return installGlobalObjectExtension(extensionObject);
|
| -}
|
| -
|
| -bool InjectedScript::Scope::installRemoteObjectAPI(const String16& objectGroupName)
|
| -{
|
| - ASSERT(m_injectedScript && !m_context.IsEmpty());
|
| - V8FunctionCall function(m_debugger, m_context, m_injectedScript->v8Value(), "remoteObjectAPI");
|
| - function.appendArgument(objectGroupName);
|
| - bool hadException = false;
|
| - v8::Local<v8::Value> extension = function.call(hadException, false);
|
| - if (hadException || extension.IsEmpty() || !extension->IsObject()) {
|
| - *m_errorString = "Internal error";
|
| - return false;
|
| - }
|
| - v8::Local<v8::Object> extensionObject = extension.As<v8::Object>();
|
| - return installGlobalObjectExtension(extensionObject);
|
| -}
|
| -
|
| -bool InjectedScript::Scope::installGlobalObjectExtension(v8::Local<v8::Object> extension)
|
| -{
|
| - ASSERT(m_global.IsEmpty());
|
| m_extensionPrivate = V8Debugger::scopeExtensionPrivate(m_debugger->isolate());
|
| v8::Local<v8::Object> global = m_context->Global();
|
| - if (!global->SetPrivate(m_context, m_extensionPrivate, extension).FromMaybe(false)) {
|
| + if (!global->SetPrivate(m_context, m_extensionPrivate, extensionObject).FromMaybe(false)) {
|
| *m_errorString = "Internal error";
|
| return false;
|
| }
|
|
|