Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(178)

Unified Diff: third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp

Issue 1811853002: [DevTools] Move evaluateOnCallFrame to native (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/sdk/RemoteObject.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp b/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp
index 8f3bc8dc3e11ec0cf31ed93ee8525700cef3602e..aa154d2a01ecd5b9331360cb18f7708ef3df1f22 100644
--- a/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp
@@ -283,7 +283,7 @@ static bool installTestInterfaceIfNeeded(LocalFrame& frame, v8::Local<v8::String
return false;
}
-static bool installCommandLineAPIIfNeeded(v8::Local<v8::Name> name, const AtomicString& nameString, const v8::PropertyCallbackInfo<v8::Value>& info)
+static bool namedPropertyFromDebuggerScopeExtension(v8::Local<v8::Name> name, const AtomicString& nameString, const v8::PropertyCallbackInfo<v8::Value>& info)
{
if (!InspectorInstrumentation::hasFrontends())
return false;
@@ -295,13 +295,12 @@ static bool installCommandLineAPIIfNeeded(v8::Local<v8::Name> name, const Atomic
v8::Isolate* isolate = info.GetIsolate();
v8::Local<v8::Context> context = isolate->GetCurrentContext();
-
v8::Local<v8::Object> global = context->Global();
- v8::Local<v8::Value> commandLineAPI;
+ v8::Local<v8::Value> scopeExtensionValue;
- if (v8Call(global->Get(context, V8Debugger::commandLineAPISymbol(isolate)), commandLineAPI)) {
+ if (v8Call(global->Get(context, V8Debugger::scopeExtensionSymbol(isolate)), scopeExtensionValue)) {
v8::Local<v8::Value> value;
- if (commandLineAPI->IsObject() && v8Call(commandLineAPI->ToObject(isolate)->Get(context, name), value)) {
+ if (scopeExtensionValue->IsObject() && v8Call(scopeExtensionValue->ToObject(isolate)->Get(context, name), value)) {
if (isMethod) {
v8SetReturnValue(info, value);
return true;
@@ -309,14 +308,13 @@ static bool installCommandLineAPIIfNeeded(v8::Local<v8::Name> name, const Atomic
if (isGetter && value->IsFunction()) {
v8::Local<v8::Function> getterFunction = v8::Local<v8::Function>::Cast(value);
v8::MicrotasksScope microtasks(isolate, v8::MicrotasksScope::kDoNotRunMicrotasks);
- if (getterFunction->Call(context, commandLineAPI, 0, nullptr).ToLocal(&value)) {
+ if (getterFunction->Call(context, scopeExtensionValue, 0, nullptr).ToLocal(&value)) {
v8SetReturnValue(info, value);
return true;
}
}
}
}
-
return false;
}
@@ -350,7 +348,7 @@ void V8Window::namedPropertyGetterCustom(v8::Local<v8::Name> name, const v8::Pro
if (installTestInterfaceIfNeeded(toLocalFrame(*frame), nameString, info))
return;
- if (installCommandLineAPIIfNeeded(name, propName, info))
+ if (namedPropertyFromDebuggerScopeExtension(name, propName, info))
return;
// Search named items in the document.
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/sdk/RemoteObject.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698