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

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

Issue 2760793002: Use v8::Context::NewRemoteContext in RemoteWindowProxy. (Closed)
Patch Set: Clean up association logic Created 3 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008, 2009, 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2008, 2009, 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 v8::Local<v8::Object> globalProxy = context->Global(); 213 v8::Local<v8::Object> globalProxy = context->Global();
214 CHECK(m_globalProxy == globalProxy); 214 CHECK(m_globalProxy == globalProxy);
215 V8DOMWrapper::setNativeInfo(isolate(), globalProxy, wrapperTypeInfo, window); 215 V8DOMWrapper::setNativeInfo(isolate(), globalProxy, wrapperTypeInfo, window);
216 // Mark the handle to be traced by Oilpan, since the global proxy has a 216 // Mark the handle to be traced by Oilpan, since the global proxy has a
217 // reference to the DOMWindow. 217 // reference to the DOMWindow.
218 m_globalProxy.get().SetWrapperClassId(wrapperTypeInfo->wrapperClassId); 218 m_globalProxy.get().SetWrapperClassId(wrapperTypeInfo->wrapperClassId);
219 219
220 // The global object, aka window wrapper object. 220 // The global object, aka window wrapper object.
221 v8::Local<v8::Object> windowWrapper = 221 v8::Local<v8::Object> windowWrapper =
222 globalProxy->GetPrototype().As<v8::Object>(); 222 globalProxy->GetPrototype().As<v8::Object>();
223 windowWrapper = V8DOMWrapper::associateObjectWithWrapper( 223 v8::Local<v8::Object> associatedWrapper =
224 isolate(), window, wrapperTypeInfo, windowWrapper); 224 associateWithWrapper(window, wrapperTypeInfo, windowWrapper);
225 DCHECK(associatedWrapper == windowWrapper);
225 226
226 // The prototype object of Window interface. 227 // The prototype object of Window interface.
227 v8::Local<v8::Object> windowPrototype = 228 v8::Local<v8::Object> windowPrototype =
228 windowWrapper->GetPrototype().As<v8::Object>(); 229 windowWrapper->GetPrototype().As<v8::Object>();
229 CHECK(!windowPrototype.IsEmpty()); 230 CHECK(!windowPrototype.IsEmpty());
230 V8DOMWrapper::setNativeInfo(isolate(), windowPrototype, wrapperTypeInfo, 231 V8DOMWrapper::setNativeInfo(isolate(), windowPrototype, wrapperTypeInfo,
231 window); 232 window);
232 233
233 // The named properties object of Window interface. 234 // The named properties object of Window interface.
234 v8::Local<v8::Object> windowProperties = 235 v8::Local<v8::Object> windowProperties =
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 438
438 setSecurityToken(origin); 439 setSecurityToken(origin);
439 } 440 }
440 441
441 LocalWindowProxy::LocalWindowProxy(v8::Isolate* isolate, 442 LocalWindowProxy::LocalWindowProxy(v8::Isolate* isolate,
442 LocalFrame& frame, 443 LocalFrame& frame,
443 RefPtr<DOMWrapperWorld> world) 444 RefPtr<DOMWrapperWorld> world)
444 : WindowProxy(isolate, frame, std::move(world)) {} 445 : WindowProxy(isolate, frame, std::move(world)) {}
445 446
446 } // namespace blink 447 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698