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

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

Issue 2848503002: Revert of binding: Changes the association among global-proxy/global/window-instance (2nd attempt).… (Closed)
Patch Set: Updated the test expectation. 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/LocalWindowProxy.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/LocalWindowProxy.cpp b/third_party/WebKit/Source/bindings/core/v8/LocalWindowProxy.cpp
index e8494d5be24cfab255ecda8c4a405ff76369e9df..def966f6dfba4b8c928228eaaedb1465a6d6cabc 100644
--- a/third_party/WebKit/Source/bindings/core/v8/LocalWindowProxy.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/LocalWindowProxy.cpp
@@ -221,9 +221,8 @@ void LocalWindowProxy::SetupWindowPrototypeChain() {
// The global proxy object. Note this is not the global object.
v8::Local<v8::Object> global_proxy = context->Global();
CHECK(global_proxy_ == global_proxy);
- v8::Local<v8::Object> associated_wrapper =
- AssociateWithWrapper(window, wrapper_type_info, global_proxy);
- DCHECK(associated_wrapper == global_proxy);
+ V8DOMWrapper::SetNativeInfo(GetIsolate(), global_proxy, wrapper_type_info,
+ window);
// 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);
@@ -231,8 +230,9 @@ void LocalWindowProxy::SetupWindowPrototypeChain() {
// The global object, aka window wrapper object.
v8::Local<v8::Object> window_wrapper =
global_proxy->GetPrototype().As<v8::Object>();
- V8DOMWrapper::SetNativeInfo(GetIsolate(), window_wrapper, wrapper_type_info,
- window);
+ v8::Local<v8::Object> associated_wrapper =
+ AssociateWithWrapper(window, wrapper_type_info, window_wrapper);
+ DCHECK(associated_wrapper == window_wrapper);
// The prototype object of Window interface.
v8::Local<v8::Object> window_prototype =
« no previous file with comments | « third_party/WebKit/Source/bindings/bindings.gni ('k') | third_party/WebKit/Source/bindings/core/v8/RemoteWindowProxy.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698