| 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 "V8TestInterface5.h" | 7 #include "V8TestInterface5.h" |
| 8 | 8 |
| 9 #include "bindings/core/v8/ExceptionState.h" | 9 #include "bindings/core/v8/ExceptionState.h" |
| 10 #include "bindings/core/v8/ScriptState.h" | 10 #include "bindings/core/v8/ScriptState.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 #include "wtf/RefPtr.h" | 21 #include "wtf/RefPtr.h" |
| 22 | 22 |
| 23 namespace blink { | 23 namespace blink { |
| 24 | 24 |
| 25 // Suppress warning: global constructors, because struct WrapperTypeInfo is triv
ial | 25 // Suppress warning: global constructors, because struct WrapperTypeInfo is triv
ial |
| 26 // and does not depend on another global objects. | 26 // and does not depend on another global objects. |
| 27 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) | 27 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) |
| 28 #pragma clang diagnostic push | 28 #pragma clang diagnostic push |
| 29 #pragma clang diagnostic ignored "-Wglobal-constructors" | 29 #pragma clang diagnostic ignored "-Wglobal-constructors" |
| 30 #endif | 30 #endif |
| 31 const WrapperTypeInfo V8TestInterface5::wrapperTypeInfo = { gin::kEmbedderBlink,
V8TestInterface5::domTemplate, V8TestInterface5::refObject, V8TestInterface5::d
erefObject, V8TestInterface5::trace, V8TestInterface5::toActiveScriptWrappable,
V8TestInterface5::visitDOMWrapper, V8TestInterface5::preparePrototypeAndInterfac
eObject, V8TestInterface5::installConditionallyEnabledProperties, "TestInterface
5", &V8TestInterfaceEmpty::wrapperTypeInfo, WrapperTypeInfo::WrapperTypeObjectPr
ototype, WrapperTypeInfo::ObjectClassId, WrapperTypeInfo::NotInheritFromEventTar
get, WrapperTypeInfo::Dependent, WrapperTypeInfo::RefCountedObject }; | 31 const WrapperTypeInfo V8TestInterface5::wrapperTypeInfo = { gin::kEmbedderBlink,
V8TestInterface5::domTemplate, V8TestInterface5::trace, V8TestInterface5::toAct
iveScriptWrappable, V8TestInterface5::visitDOMWrapper, V8TestInterface5::prepare
PrototypeAndInterfaceObject, V8TestInterface5::installConditionallyEnabledProper
ties, "TestInterface5", &V8TestInterfaceEmpty::wrapperTypeInfo, WrapperTypeInfo:
:WrapperTypeObjectPrototype, WrapperTypeInfo::ObjectClassId, WrapperTypeInfo::No
tInheritFromEventTarget, WrapperTypeInfo::Dependent }; |
| 32 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) | 32 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) |
| 33 #pragma clang diagnostic pop | 33 #pragma clang diagnostic pop |
| 34 #endif | 34 #endif |
| 35 | 35 |
| 36 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestInterfac
e5Implementation.h. | 36 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestInterfac
e5Implementation.h. |
| 37 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in | 37 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in |
| 38 // bindings/core/v8/ScriptWrappable.h. | 38 // bindings/core/v8/ScriptWrappable.h. |
| 39 const WrapperTypeInfo& TestInterface5Implementation::s_wrapperTypeInfo = V8TestI
nterface5::wrapperTypeInfo; | 39 const WrapperTypeInfo& TestInterface5Implementation::s_wrapperTypeInfo = V8TestI
nterface5::wrapperTypeInfo; |
| 40 | 40 |
| 41 namespace TestInterface5ImplementationV8Internal { | 41 namespace TestInterface5ImplementationV8Internal { |
| (...skipping 14 matching lines...) Expand all Loading... |
| 56 { | 56 { |
| 57 v8::Local<v8::Object> holder = info.Holder(); | 57 v8::Local<v8::Object> holder = info.Holder(); |
| 58 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceA
ttribute", "TestInterface5", holder, info.GetIsolate()); | 58 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceA
ttribute", "TestInterface5", holder, info.GetIsolate()); |
| 59 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 59 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 60 TestInterface5Implementation* cppValue = V8TestInterface5::toImplWithTypeChe
ck(info.GetIsolate(), v8Value); | 60 TestInterface5Implementation* cppValue = V8TestInterface5::toImplWithTypeChe
ck(info.GetIsolate(), v8Value); |
| 61 if (!cppValue) { | 61 if (!cppValue) { |
| 62 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terface5'."); | 62 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terface5'."); |
| 63 exceptionState.throwIfNeeded(); | 63 exceptionState.throwIfNeeded(); |
| 64 return; | 64 return; |
| 65 } | 65 } |
| 66 impl->setTestInterfaceAttribute(WTF::getPtr(cppValue)); | 66 impl->setTestInterfaceAttribute(cppValue); |
| 67 } | 67 } |
| 68 | 68 |
| 69 static void testInterfaceAttributeAttributeSetterCallback(const v8::FunctionCall
backInfo<v8::Value>& info) | 69 static void testInterfaceAttributeAttributeSetterCallback(const v8::FunctionCall
backInfo<v8::Value>& info) |
| 70 { | 70 { |
| 71 v8::Local<v8::Value> v8Value = info[0]; | 71 v8::Local<v8::Value> v8Value = info[0]; |
| 72 TestInterface5ImplementationV8Internal::testInterfaceAttributeAttributeSette
r(v8Value, info); | 72 TestInterface5ImplementationV8Internal::testInterfaceAttributeAttributeSette
r(v8Value, info); |
| 73 } | 73 } |
| 74 | 74 |
| 75 static void doubleAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | 75 static void doubleAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Va
lue>& info) |
| 76 { | 76 { |
| (...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 516 static void voidMethodDoubleOrDOMStringArgMethodCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) | 516 static void voidMethodDoubleOrDOMStringArgMethodCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) |
| 517 { | 517 { |
| 518 TestInterface5ImplementationV8Internal::voidMethodDoubleOrDOMStringArgMethod
(info); | 518 TestInterface5ImplementationV8Internal::voidMethodDoubleOrDOMStringArgMethod
(info); |
| 519 } | 519 } |
| 520 | 520 |
| 521 static void keysMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 521 static void keysMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 522 { | 522 { |
| 523 ExceptionState exceptionState(ExceptionState::ExecutionContext, "keys", "Tes
tInterface5", info.Holder(), info.GetIsolate()); | 523 ExceptionState exceptionState(ExceptionState::ExecutionContext, "keys", "Tes
tInterface5", info.Holder(), info.GetIsolate()); |
| 524 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 524 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
| 525 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 525 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| 526 RawPtr<Iterator> result = impl->keysForBinding(scriptState, exceptionState); | 526 Iterator* result = impl->keysForBinding(scriptState, exceptionState); |
| 527 if (exceptionState.hadException()) { | 527 if (exceptionState.hadException()) { |
| 528 exceptionState.throwIfNeeded(); | 528 exceptionState.throwIfNeeded(); |
| 529 return; | 529 return; |
| 530 } | 530 } |
| 531 v8SetReturnValue(info, result.release()); | 531 v8SetReturnValue(info, result); |
| 532 } | 532 } |
| 533 | 533 |
| 534 static void keysMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) | 534 static void keysMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 535 { | 535 { |
| 536 TestInterface5ImplementationV8Internal::keysMethod(info); | 536 TestInterface5ImplementationV8Internal::keysMethod(info); |
| 537 } | 537 } |
| 538 | 538 |
| 539 static void valuesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 539 static void valuesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 540 { | 540 { |
| 541 ExceptionState exceptionState(ExceptionState::ExecutionContext, "values", "T
estInterface5", info.Holder(), info.GetIsolate()); | 541 ExceptionState exceptionState(ExceptionState::ExecutionContext, "values", "T
estInterface5", info.Holder(), info.GetIsolate()); |
| 542 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 542 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
| 543 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 543 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| 544 RawPtr<Iterator> result = impl->valuesForBinding(scriptState, exceptionState
); | 544 Iterator* result = impl->valuesForBinding(scriptState, exceptionState); |
| 545 if (exceptionState.hadException()) { | 545 if (exceptionState.hadException()) { |
| 546 exceptionState.throwIfNeeded(); | 546 exceptionState.throwIfNeeded(); |
| 547 return; | 547 return; |
| 548 } | 548 } |
| 549 v8SetReturnValue(info, result.release()); | 549 v8SetReturnValue(info, result); |
| 550 } | 550 } |
| 551 | 551 |
| 552 static void valuesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info
) | 552 static void valuesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info
) |
| 553 { | 553 { |
| 554 TestInterface5ImplementationV8Internal::valuesMethod(info); | 554 TestInterface5ImplementationV8Internal::valuesMethod(info); |
| 555 } | 555 } |
| 556 | 556 |
| 557 static void entriesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 557 static void entriesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 558 { | 558 { |
| 559 ExceptionState exceptionState(ExceptionState::ExecutionContext, "entries", "
TestInterface5", info.Holder(), info.GetIsolate()); | 559 ExceptionState exceptionState(ExceptionState::ExecutionContext, "entries", "
TestInterface5", info.Holder(), info.GetIsolate()); |
| 560 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 560 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
| 561 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 561 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| 562 RawPtr<Iterator> result = impl->entriesForBinding(scriptState, exceptionStat
e); | 562 Iterator* result = impl->entriesForBinding(scriptState, exceptionState); |
| 563 if (exceptionState.hadException()) { | 563 if (exceptionState.hadException()) { |
| 564 exceptionState.throwIfNeeded(); | 564 exceptionState.throwIfNeeded(); |
| 565 return; | 565 return; |
| 566 } | 566 } |
| 567 v8SetReturnValue(info, result.release()); | 567 v8SetReturnValue(info, result); |
| 568 } | 568 } |
| 569 | 569 |
| 570 static void entriesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf
o) | 570 static void entriesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf
o) |
| 571 { | 571 { |
| 572 TestInterface5ImplementationV8Internal::entriesMethod(info); | 572 TestInterface5ImplementationV8Internal::entriesMethod(info); |
| 573 } | 573 } |
| 574 | 574 |
| 575 static void forEachMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 575 static void forEachMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 576 { | 576 { |
| 577 ExceptionState exceptionState(ExceptionState::ExecutionContext, "forEach", "
TestInterface5", info.Holder(), info.GetIsolate()); | 577 ExceptionState exceptionState(ExceptionState::ExecutionContext, "forEach", "
TestInterface5", info.Holder(), info.GetIsolate()); |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 614 static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in
fo) | 614 static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in
fo) |
| 615 { | 615 { |
| 616 TestInterface5ImplementationV8Internal::toStringMethod(info); | 616 TestInterface5ImplementationV8Internal::toStringMethod(info); |
| 617 } | 617 } |
| 618 | 618 |
| 619 static void iteratorMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 619 static void iteratorMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 620 { | 620 { |
| 621 ExceptionState exceptionState(ExceptionState::ExecutionContext, "iterator",
"TestInterface5", info.Holder(), info.GetIsolate()); | 621 ExceptionState exceptionState(ExceptionState::ExecutionContext, "iterator",
"TestInterface5", info.Holder(), info.GetIsolate()); |
| 622 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 622 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
| 623 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 623 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| 624 RawPtr<Iterator> result = impl->iterator(scriptState, exceptionState); | 624 Iterator* result = impl->iterator(scriptState, exceptionState); |
| 625 if (exceptionState.hadException()) { | 625 if (exceptionState.hadException()) { |
| 626 exceptionState.throwIfNeeded(); | 626 exceptionState.throwIfNeeded(); |
| 627 return; | 627 return; |
| 628 } | 628 } |
| 629 v8SetReturnValue(info, result.release()); | 629 v8SetReturnValue(info, result); |
| 630 } | 630 } |
| 631 | 631 |
| 632 static void iteratorMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in
fo) | 632 static void iteratorMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in
fo) |
| 633 { | 633 { |
| 634 TestInterface5ImplementationV8Internal::iteratorMethod(info); | 634 TestInterface5ImplementationV8Internal::iteratorMethod(info); |
| 635 } | 635 } |
| 636 | 636 |
| 637 static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo
<v8::Value>& info) | 637 static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo
<v8::Value>& info) |
| 638 { | 638 { |
| 639 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 639 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 914 const V8DOMConfiguration::MethodConfiguration windowAndServiceWorkerExpo
sedMethodMethodConfiguration = {"windowAndServiceWorkerExposedMethod", TestInter
face5ImplementationV8Internal::windowAndServiceWorkerExposedMethodMethodCallback
, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::O
nPrototype}; | 914 const V8DOMConfiguration::MethodConfiguration windowAndServiceWorkerExpo
sedMethodMethodConfiguration = {"windowAndServiceWorkerExposedMethod", TestInter
face5ImplementationV8Internal::windowAndServiceWorkerExposedMethodMethodCallback
, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::O
nPrototype}; |
| 915 V8DOMConfiguration::installMethod(isolate, v8::Local<v8::Object>(), prot
otypeObject, interfaceObject, signature, windowAndServiceWorkerExposedMethodMeth
odConfiguration); | 915 V8DOMConfiguration::installMethod(isolate, v8::Local<v8::Object>(), prot
otypeObject, interfaceObject, signature, windowAndServiceWorkerExposedMethodMeth
odConfiguration); |
| 916 } | 916 } |
| 917 } | 917 } |
| 918 | 918 |
| 919 ActiveScriptWrappable* V8TestInterface5::toActiveScriptWrappable(v8::Local<v8::O
bject> wrapper) | 919 ActiveScriptWrappable* V8TestInterface5::toActiveScriptWrappable(v8::Local<v8::O
bject> wrapper) |
| 920 { | 920 { |
| 921 return toImpl(wrapper); | 921 return toImpl(wrapper); |
| 922 } | 922 } |
| 923 | 923 |
| 924 void V8TestInterface5::refObject(ScriptWrappable* scriptWrappable) | |
| 925 { | |
| 926 scriptWrappable->toImpl<TestInterface5Implementation>()->ref(); | |
| 927 } | |
| 928 | |
| 929 void V8TestInterface5::derefObject(ScriptWrappable* scriptWrappable) | |
| 930 { | |
| 931 scriptWrappable->toImpl<TestInterface5Implementation>()->deref(); | |
| 932 } | |
| 933 | |
| 934 } // namespace blink | 924 } // namespace blink |
| OLD | NEW |