| 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 3b155d37ca2b13c5130c16966fc79a648c7b91ef..2371a4a6ac9e84b4392f1ac8a48a740a7ac307fc 100644
|
| --- a/third_party/WebKit/Source/platform/v8_inspector/InjectedScript.cpp
|
| +++ b/third_party/WebKit/Source/platform/v8_inspector/InjectedScript.cpp
|
| @@ -342,6 +342,25 @@ void InjectedScript::releaseObject(const String& objectId)
|
| m_native->unbind(boundId);
|
| }
|
|
|
| +v8::MaybeLocal<v8::Value> InjectedScript::runCompiledScript(v8::Local<v8::Script> script, bool includeCommandLineAPI)
|
| +{
|
| + v8::Local<v8::Symbol> commandLineAPISymbolValue = V8Debugger::commandLineAPISymbol(m_isolate);
|
| + v8::Local<v8::Object> global = context()->Global();
|
| + if (includeCommandLineAPI) {
|
| + V8FunctionCall function(m_client, context(), v8Value(), "commandLineAPI");
|
| + bool hadException = false;
|
| + v8::Local<v8::Value> commandLineAPI = function.call(hadException, false);
|
| + if (!hadException)
|
| + global->Set(commandLineAPISymbolValue, commandLineAPI);
|
| + }
|
| +
|
| + v8::MaybeLocal<v8::Value> maybeValue = m_client->runCompiledScript(context(), script);
|
| + if (includeCommandLineAPI)
|
| + global->Delete(context(), commandLineAPISymbolValue);
|
| +
|
| + return maybeValue;
|
| +}
|
| +
|
| PassRefPtr<Array<CallFrame>> InjectedScript::wrapCallFrames(v8::Local<v8::Object> callFrames, int asyncOrdinal)
|
| {
|
| v8::HandleScope handles(m_isolate);
|
|
|