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

Unified Diff: third_party/WebKit/Source/core/inspector/v8/V8InjectedScriptHost.cpp

Issue 1636223002: DevTools: remove ScriptState/Value from the InjectedScript APIs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments addressed Created 4 years, 11 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
Index: third_party/WebKit/Source/core/inspector/v8/V8InjectedScriptHost.cpp
diff --git a/third_party/WebKit/Source/core/inspector/v8/V8InjectedScriptHost.cpp b/third_party/WebKit/Source/core/inspector/v8/V8InjectedScriptHost.cpp
index 65419f703f75413c3146191a54dc8b4d4b18fdaf..e7c04e6b0f3b3c6678c48e57b5e3649604450d54 100644
--- a/third_party/WebKit/Source/core/inspector/v8/V8InjectedScriptHost.cpp
+++ b/third_party/WebKit/Source/core/inspector/v8/V8InjectedScriptHost.cpp
@@ -47,9 +47,10 @@ void V8InjectedScriptHost::inspectedObjectCallback(const v8::FunctionCallbackInf
return;
}
- InjectedScriptHost* host = V8InjectedScriptHost::unwrap(info.GetIsolate()->GetCurrentContext(), info.Holder());
+ v8::Local<v8::Context> context = info.GetIsolate()->GetCurrentContext();
+ InjectedScriptHost* host = V8InjectedScriptHost::unwrap(context, info.Holder());
InjectedScriptHost::InspectableObject* object = host->inspectedObject(info[0].As<v8::Int32>()->Value());
- v8SetReturnValue(info, object->get(ScriptState::current(info.GetIsolate())).v8Value());
+ v8SetReturnValue(info, object->get(context));
}
static v8::Local<v8::String> functionDisplayName(v8::Local<v8::Function> function)
@@ -239,7 +240,7 @@ void V8InjectedScriptHost::getEventListenersCallback(const v8::FunctionCallbackI
InjectedScriptHost* host = V8InjectedScriptHost::unwrap(info.GetIsolate()->GetCurrentContext(), info.Holder());
V8DebuggerClient* client = static_cast<V8DebuggerImpl&>(host->debugger()).client();
EventListenerInfoMap listenerInfo;
- client->eventListeners(info.GetIsolate(), info[0], listenerInfo);
+ client->eventListeners(info[0], listenerInfo);
v8::Local<v8::Object> result = v8::Object::New(info.GetIsolate());
Vector<String> types;

Powered by Google App Engine
This is Rietveld 408576698