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

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

Issue 2693893007: binding: Changes the association among global-proxy/global/window-instance (2nd attempt). (Closed)
Patch Set: Fixed a typo in DOMWrapperWorld::DissociateDOMWindowWrappersInAllWorlds. Created 3 years, 8 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/bindings/core/v8/RemoteWindowProxy.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/RemoteWindowProxy.cpp b/third_party/WebKit/Source/bindings/core/v8/RemoteWindowProxy.cpp
index 1c9060063465d69bc2487af7bad01b1020314442..3625ce5db95ed23e659b893f380d4dc397bd85bd 100644
--- a/third_party/WebKit/Source/bindings/core/v8/RemoteWindowProxy.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/RemoteWindowProxy.cpp
@@ -125,9 +125,9 @@ void RemoteWindowProxy::SetupWindowPrototypeChain() {
// The global proxy object. Note this is not the global object.
v8::Local<v8::Object> global_proxy = global_proxy_.NewLocal(GetIsolate());
- CHECK(global_proxy_ == global_proxy);
- V8DOMWrapper::SetNativeInfo(GetIsolate(), global_proxy, wrapper_type_info,
- window);
+ v8::Local<v8::Object> associated_wrapper =
+ AssociateWithWrapper(window, wrapper_type_info, global_proxy);
+ DCHECK(associated_wrapper == global_proxy);
// Mark the handle to be traced by Oilpan, since the global proxy has a
// reference to the DOMWindow.
global_proxy_.Get().SetWrapperClassId(wrapper_type_info->wrapper_class_id);
@@ -135,9 +135,8 @@ void RemoteWindowProxy::SetupWindowPrototypeChain() {
// The global object, aka window wrapper object.
v8::Local<v8::Object> window_wrapper =
global_proxy->GetPrototype().As<v8::Object>();
- v8::Local<v8::Object> associated_wrapper =
- AssociateWithWrapper(window, wrapper_type_info, window_wrapper);
- DCHECK(associated_wrapper == window_wrapper);
+ V8DOMWrapper::SetNativeInfo(GetIsolate(), window_wrapper, wrapper_type_info,
+ window);
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698