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

Side by Side Diff: Source/bindings/tests/results/V8TestTypedefs.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 "V8TestTypedefs.h" 8 #include "V8TestTypedefs.h"
9 9
10 #include "bindings/core/v8/ExceptionState.h" 10 #include "bindings/core/v8/ExceptionState.h"
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 v8::Handle<v8::Object> V8TestTypedefs::findInstanceInPrototypeChain(v8::Handle<v 8::Value> v8Value, v8::Isolate* isolate) 372 v8::Handle<v8::Object> V8TestTypedefs::findInstanceInPrototypeChain(v8::Handle<v 8::Value> v8Value, v8::Isolate* isolate)
373 { 373 {
374 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe rTypeInfo, v8Value); 374 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe rTypeInfo, v8Value);
375 } 375 }
376 376
377 TestTypedefs* V8TestTypedefs::toNativeWithTypeCheck(v8::Isolate* isolate, v8::Ha ndle<v8::Value> value) 377 TestTypedefs* V8TestTypedefs::toNativeWithTypeCheck(v8::Isolate* isolate, v8::Ha ndle<v8::Value> value)
378 { 378 {
379 return hasInstance(value, isolate) ? fromInternalPointer(blink::toInternalPo inter(v8::Handle<v8::Object>::Cast(value))) : 0; 379 return hasInstance(value, isolate) ? fromInternalPointer(blink::toInternalPo inter(v8::Handle<v8::Object>::Cast(value))) : 0;
380 } 380 }
381 381
382 v8::Handle<v8::Object> wrap(TestTypedefs* impl, v8::Handle<v8::Object> creationC ontext, v8::Isolate* isolate)
383 {
384 ASSERT(impl);
385 ASSERT(!DOMDataStore::containsWrapper<V8TestTypedefs>(impl, isolate));
386 return V8TestTypedefs::createWrapper(impl, creationContext, isolate);
387 }
388
389 v8::Handle<v8::Object> V8TestTypedefs::createWrapper(PassRefPtr<TestTypedefs> im pl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
390 {
391 ASSERT(impl);
392 ASSERT(!DOMDataStore::containsWrapper<V8TestTypedefs>(impl.get(), isolate));
393 const WrapperTypeInfo* actualInfo = impl->typeInfo();
394 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapperType Info. These will both have
395 // the same object de-ref functions, though, so use that as the basis of the check.
396 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction == wrapperTypeInfo.derefObjectFunction);
397
398 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext , &wrapperTypeInfo, toInternalPointer(impl.get()), isolate);
399 if (UNLIKELY(wrapper.IsEmpty()))
400 return wrapper;
401
402 installConditionallyEnabledProperties(wrapper, isolate);
403 V8DOMWrapper::associateObjectWithWrapper<V8TestTypedefs>(impl, &wrapperTypeI nfo, wrapper, isolate);
404 return wrapper;
405 }
406
407 382
408 void V8TestTypedefs::refObject(ScriptWrappableBase* internalPointer) 383 void V8TestTypedefs::refObject(ScriptWrappableBase* internalPointer)
409 { 384 {
410 fromInternalPointer(internalPointer)->ref(); 385 fromInternalPointer(internalPointer)->ref();
411 } 386 }
412 387
413 void V8TestTypedefs::derefObject(ScriptWrappableBase* internalPointer) 388 void V8TestTypedefs::derefObject(ScriptWrappableBase* internalPointer)
414 { 389 {
415 fromInternalPointer(internalPointer)->deref(); 390 fromInternalPointer(internalPointer)->deref();
416 } 391 }
417 392
418 WrapperPersistentNode* V8TestTypedefs::createPersistentHandle(ScriptWrappableBas e* internalPointer) 393 WrapperPersistentNode* V8TestTypedefs::createPersistentHandle(ScriptWrappableBas e* internalPointer)
419 { 394 {
420 ASSERT_NOT_REACHED(); 395 ASSERT_NOT_REACHED();
421 return 0; 396 return 0;
422 } 397 }
423 398
424 template<> 399 template<>
425 v8::Handle<v8::Value> toV8NoInline(TestTypedefs* impl, v8::Handle<v8::Object> cr eationContext, v8::Isolate* isolate) 400 v8::Handle<v8::Value> toV8NoInline(TestTypedefs* impl, v8::Handle<v8::Object> cr eationContext, v8::Isolate* isolate)
426 { 401 {
427 return toV8(impl, creationContext, isolate); 402 return toV8(impl, creationContext, isolate);
428 } 403 }
429 404
430 } // namespace blink 405 } // namespace blink
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestTypedefs.h ('k') | Source/build/scripts/templates/ElementWrapperFactory.cpp.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698