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

Side by Side Diff: Source/bindings/tests/results/V8TestInterfaceWillBeGarbageCollected.cpp

Issue 531183003: bindings: Retires manual dispatching in createV8{HTML,SVG}Wrapper, etc. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Added FIXME comments. Created 6 years, 3 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! 5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY!
6 6
7 #include "config.h" 7 #include "config.h"
8 #include "V8TestInterfaceWillBeGarbageCollected.h" 8 #include "V8TestInterfaceWillBeGarbageCollected.h"
9 9
10 #include "bindings/core/v8/ExceptionState.h" 10 #include "bindings/core/v8/ExceptionState.h"
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 TestInterfaceWillBeGarbageCollected* V8TestInterfaceWillBeGarbageCollected::toNa tiveWithTypeCheck(v8::Isolate* isolate, v8::Handle<v8::Value> value) 223 TestInterfaceWillBeGarbageCollected* V8TestInterfaceWillBeGarbageCollected::toNa tiveWithTypeCheck(v8::Isolate* isolate, v8::Handle<v8::Value> value)
224 { 224 {
225 return hasInstance(value, isolate) ? fromInternalPointer(blink::toInternalPo inter(v8::Handle<v8::Object>::Cast(value))) : 0; 225 return hasInstance(value, isolate) ? fromInternalPointer(blink::toInternalPo inter(v8::Handle<v8::Object>::Cast(value))) : 0;
226 } 226 }
227 227
228 EventTarget* V8TestInterfaceWillBeGarbageCollected::toEventTarget(v8::Handle<v8: :Object> object) 228 EventTarget* V8TestInterfaceWillBeGarbageCollected::toEventTarget(v8::Handle<v8: :Object> object)
229 { 229 {
230 return toNative(object); 230 return toNative(object);
231 } 231 }
232 232
233 v8::Handle<v8::Object> wrap(TestInterfaceWillBeGarbageCollected* impl, v8::Handl e<v8::Object> creationContext, v8::Isolate* isolate)
234 {
235 ASSERT(impl);
236 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceWillBeGarbageCollected> (impl, isolate));
237 return V8TestInterfaceWillBeGarbageCollected::createWrapper(impl, creationCo ntext, isolate);
238 }
239
240 v8::Handle<v8::Object> V8TestInterfaceWillBeGarbageCollected::createWrapper(Pass RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> impl, v8::Handle<v8::Obj ect> creationContext, v8::Isolate* isolate)
241 {
242 ASSERT(impl);
243 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceWillBeGarbageCollected> (impl.get(), isolate));
244 const WrapperTypeInfo* actualInfo = impl->typeInfo();
245 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapperType Info. These will both have
246 // the same object de-ref functions, though, so use that as the basis of the check.
247 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction == wrapperTypeInfo.derefObjectFunction);
248
249 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext , &wrapperTypeInfo, toInternalPointer(impl.get()), isolate);
250 if (UNLIKELY(wrapper.IsEmpty()))
251 return wrapper;
252
253 installConditionallyEnabledProperties(wrapper, isolate);
254 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceWillBeGarbageCollect ed>(impl, &wrapperTypeInfo, wrapper, isolate);
255 return wrapper;
256 }
257
258 233
259 void V8TestInterfaceWillBeGarbageCollected::refObject(ScriptWrappableBase* inter nalPointer) 234 void V8TestInterfaceWillBeGarbageCollected::refObject(ScriptWrappableBase* inter nalPointer)
260 { 235 {
261 #if !ENABLE(OILPAN) 236 #if !ENABLE(OILPAN)
262 fromInternalPointer(internalPointer)->ref(); 237 fromInternalPointer(internalPointer)->ref();
263 #endif 238 #endif
264 } 239 }
265 240
266 void V8TestInterfaceWillBeGarbageCollected::derefObject(ScriptWrappableBase* int ernalPointer) 241 void V8TestInterfaceWillBeGarbageCollected::derefObject(ScriptWrappableBase* int ernalPointer)
267 { 242 {
(...skipping 12 matching lines...) Expand all
280 #endif 255 #endif
281 } 256 }
282 257
283 template<> 258 template<>
284 v8::Handle<v8::Value> toV8NoInline(TestInterfaceWillBeGarbageCollected* impl, v8 ::Handle<v8::Object> creationContext, v8::Isolate* isolate) 259 v8::Handle<v8::Value> toV8NoInline(TestInterfaceWillBeGarbageCollected* impl, v8 ::Handle<v8::Object> creationContext, v8::Isolate* isolate)
285 { 260 {
286 return toV8(impl, creationContext, isolate); 261 return toV8(impl, creationContext, isolate);
287 } 262 }
288 263
289 } // namespace blink 264 } // namespace blink
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestInterfaceWillBeGarbageCollected.h ('k') | Source/bindings/tests/results/V8TestNode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698