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

Unified Diff: third_party/WebKit/Source/platform/v8_inspector/V8InjectedScriptHost.cpp

Issue 2253643002: [DevTools] Copy objects from debugger context to inspected context properly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: copier Created 4 years, 4 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/platform/v8_inspector/V8InjectedScriptHost.cpp
diff --git a/third_party/WebKit/Source/platform/v8_inspector/V8InjectedScriptHost.cpp b/third_party/WebKit/Source/platform/v8_inspector/V8InjectedScriptHost.cpp
index f016ccc0219530f474ae7f2cf36033c173b212e7..782e5bbab014739c75726871ec7dc193b38f4843 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/V8InjectedScriptHost.cpp
+++ b/third_party/WebKit/Source/platform/v8_inspector/V8InjectedScriptHost.cpp
@@ -42,6 +42,8 @@ v8::Local<v8::Object> V8InjectedScriptHost::create(v8::Local<v8::Context> contex
{
v8::Isolate* isolate = inspector->isolate();
v8::Local<v8::Object> injectedScriptHost = v8::Object::New(isolate);
+ bool success = injectedScriptHost->SetPrototype(context, v8::Null(isolate)).FromMaybe(false);
+ DCHECK(success);
v8::Local<v8::External> debuggerExternal = v8::External::New(isolate, inspector);
setFunctionProperty(context, injectedScriptHost, "internalConstructorName", V8InjectedScriptHost::internalConstructorNameCallback, debuggerExternal);
setFunctionProperty(context, injectedScriptHost, "formatAccessorsAsProperties", V8InjectedScriptHost::formatAccessorsAsProperties, debuggerExternal);

Powered by Google App Engine
This is Rietveld 408576698