OLD | NEW |
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 "V8TestInterface2.h" | 8 #include "V8TestInterface2.h" |
9 | 9 |
10 #include "bindings/core/v8/ExceptionState.h" | 10 #include "bindings/core/v8/ExceptionState.h" |
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
513 v8::Handle<v8::Object> V8TestInterface2::findInstanceInPrototypeChain(v8::Handle
<v8::Value> v8Value, v8::Isolate* isolate) | 513 v8::Handle<v8::Object> V8TestInterface2::findInstanceInPrototypeChain(v8::Handle
<v8::Value> v8Value, v8::Isolate* isolate) |
514 { | 514 { |
515 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); | 515 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); |
516 } | 516 } |
517 | 517 |
518 TestInterface2* V8TestInterface2::toNativeWithTypeCheck(v8::Isolate* isolate, v8
::Handle<v8::Value> value) | 518 TestInterface2* V8TestInterface2::toNativeWithTypeCheck(v8::Isolate* isolate, v8
::Handle<v8::Value> value) |
519 { | 519 { |
520 return hasInstance(value, isolate) ? fromInternalPointer(blink::toInternalPo
inter(v8::Handle<v8::Object>::Cast(value))) : 0; | 520 return hasInstance(value, isolate) ? fromInternalPointer(blink::toInternalPo
inter(v8::Handle<v8::Object>::Cast(value))) : 0; |
521 } | 521 } |
522 | 522 |
523 v8::Handle<v8::Object> wrap(TestInterface2* impl, v8::Handle<v8::Object> creatio
nContext, v8::Isolate* isolate) | |
524 { | |
525 ASSERT(impl); | |
526 if (impl->isTestInterface()) | |
527 return wrap(toTestInterface(impl), creationContext, isolate); | |
528 if (impl->isTestInterfaceEmpty()) | |
529 return wrap(toTestInterfaceEmpty(impl), creationContext, isolate); | |
530 v8::Handle<v8::Object> wrapper = V8TestInterface2::createWrapper(impl, creat
ionContext, isolate); | |
531 return wrapper; | |
532 } | |
533 | |
534 v8::Handle<v8::Object> V8TestInterface2::createWrapper(PassRefPtr<TestInterface2
> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) | |
535 { | |
536 ASSERT(impl); | |
537 ASSERT(!DOMDataStore::containsWrapper<V8TestInterface2>(impl.get(), isolate)
); | |
538 const WrapperTypeInfo* actualInfo = impl->typeInfo(); | |
539 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapperType
Info. These will both have | |
540 // the same object de-ref functions, though, so use that as the basis of the
check. | |
541 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction ==
wrapperTypeInfo.derefObjectFunction); | |
542 | |
543 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext
, &wrapperTypeInfo, toInternalPointer(impl.get()), isolate); | |
544 if (UNLIKELY(wrapper.IsEmpty())) | |
545 return wrapper; | |
546 | |
547 installConditionallyEnabledProperties(wrapper, isolate); | |
548 V8DOMWrapper::associateObjectWithWrapper<V8TestInterface2>(impl, &wrapperTyp
eInfo, wrapper, isolate); | |
549 return wrapper; | |
550 } | |
551 | |
552 | 523 |
553 void V8TestInterface2::refObject(ScriptWrappableBase* internalPointer) | 524 void V8TestInterface2::refObject(ScriptWrappableBase* internalPointer) |
554 { | 525 { |
555 fromInternalPointer(internalPointer)->ref(); | 526 fromInternalPointer(internalPointer)->ref(); |
556 } | 527 } |
557 | 528 |
558 void V8TestInterface2::derefObject(ScriptWrappableBase* internalPointer) | 529 void V8TestInterface2::derefObject(ScriptWrappableBase* internalPointer) |
559 { | 530 { |
560 fromInternalPointer(internalPointer)->deref(); | 531 fromInternalPointer(internalPointer)->deref(); |
561 } | 532 } |
562 | 533 |
563 WrapperPersistentNode* V8TestInterface2::createPersistentHandle(ScriptWrappableB
ase* internalPointer) | 534 WrapperPersistentNode* V8TestInterface2::createPersistentHandle(ScriptWrappableB
ase* internalPointer) |
564 { | 535 { |
565 ASSERT_NOT_REACHED(); | 536 ASSERT_NOT_REACHED(); |
566 return 0; | 537 return 0; |
567 } | 538 } |
568 | 539 |
569 template<> | 540 template<> |
570 v8::Handle<v8::Value> toV8NoInline(TestInterface2* impl, v8::Handle<v8::Object>
creationContext, v8::Isolate* isolate) | 541 v8::Handle<v8::Value> toV8NoInline(TestInterface2* impl, v8::Handle<v8::Object>
creationContext, v8::Isolate* isolate) |
571 { | 542 { |
572 return toV8(impl, creationContext, isolate); | 543 return toV8(impl, creationContext, isolate); |
573 } | 544 } |
574 | 545 |
575 } // namespace blink | 546 } // namespace blink |
OLD | NEW |