| 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 "V8TestInterfaceConstructor2.h" | 8 #include "V8TestInterfaceConstructor2.h" |
| 9 | 9 |
| 10 #include "bindings/core/v8/Dictionary.h" | 10 #include "bindings/core/v8/Dictionary.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in | 29 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in |
| 30 // bindings/core/v8/ScriptWrappable.h. | 30 // bindings/core/v8/ScriptWrappable.h. |
| 31 const WrapperTypeInfo& TestInterfaceConstructor2::s_wrapperTypeInfo = V8TestInte
rfaceConstructor2::wrapperTypeInfo; | 31 const WrapperTypeInfo& TestInterfaceConstructor2::s_wrapperTypeInfo = V8TestInte
rfaceConstructor2::wrapperTypeInfo; |
| 32 | 32 |
| 33 namespace TestInterfaceConstructor2V8Internal { | 33 namespace TestInterfaceConstructor2V8Internal { |
| 34 | 34 |
| 35 static void constructor1(const v8::FunctionCallbackInfo<v8::Value>& info) | 35 static void constructor1(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 36 { | 36 { |
| 37 V8StringResource<> stringArg; | 37 V8StringResource<> stringArg; |
| 38 { | 38 { |
| 39 TOSTRING_VOID_INTERNAL(stringArg, info[0]); | 39 TONATIVE_CONVERT((stringArg = info[0]).prepare(), return); |
| 40 } | 40 } |
| 41 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(s
tringArg); | 41 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(s
tringArg); |
| 42 v8::Local<v8::Object> wrapper = info.Holder(); | 42 v8::Local<v8::Object> wrapper = info.Holder(); |
| 43 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstructor2::
wrapperTypeInfo, wrapper); | 43 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstructor2::
wrapperTypeInfo, wrapper); |
| 44 v8SetReturnValue(info, wrapper); | 44 v8SetReturnValue(info, wrapper); |
| 45 } | 45 } |
| 46 | 46 |
| 47 static void constructor2(const v8::FunctionCallbackInfo<v8::Value>& info) | 47 static void constructor2(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 48 { | 48 { |
| 49 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor2", info.Holder(), info.GetIsolate()); | 49 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor2", info.Holder(), info.GetIsolate()); |
| 50 Dictionary dictionaryArg; | 50 Dictionary dictionaryArg; |
| 51 { | 51 { |
| 52 if (!isUndefinedOrNull(info[0]) && !info[0]->IsObject()) { | 52 if (!isUndefinedOrNull(info[0]) && !info[0]->IsObject()) { |
| 53 exceptionState.throwTypeError("parameter 1 ('dictionaryArg') is not
an object."); | 53 exceptionState.throwTypeError("parameter 1 ('dictionaryArg') is not
an object."); |
| 54 exceptionState.throwIfNeeded(); | 54 exceptionState.throwIfNeeded(); |
| 55 return; | 55 return; |
| 56 } | 56 } |
| 57 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(dictionaryArg, Dictionary(info[0],
info.GetIsolate(), exceptionState), exceptionState); | 57 TONATIVE_CONVERT(convertAndThrow(dictionaryArg = Dictionary(info[0], inf
o.GetIsolate(), exceptionState), exceptionState), return); |
| 58 } | 58 } |
| 59 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(d
ictionaryArg); | 59 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(d
ictionaryArg); |
| 60 v8::Local<v8::Object> wrapper = info.Holder(); | 60 v8::Local<v8::Object> wrapper = info.Holder(); |
| 61 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstructor2::
wrapperTypeInfo, wrapper); | 61 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstructor2::
wrapperTypeInfo, wrapper); |
| 62 v8SetReturnValue(info, wrapper); | 62 v8SetReturnValue(info, wrapper); |
| 63 } | 63 } |
| 64 | 64 |
| 65 static void constructor3(const v8::FunctionCallbackInfo<v8::Value>& info) | 65 static void constructor3(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 66 { | 66 { |
| 67 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor2", info.Holder(), info.GetIsolate()); | 67 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor2", info.Holder(), info.GetIsolate()); |
| 68 Vector<Vector<String>> stringSequenceSequenceArg; | 68 Vector<Vector<String>> stringSequenceSequenceArg; |
| 69 { | 69 { |
| 70 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(stringSequenceSequenceArg, toImplA
rray<Vector<String>>(info[0], 1, info.GetIsolate(), exceptionState), exceptionSt
ate); | 70 TONATIVE_CONVERT(convertAndThrow(stringSequenceSequenceArg = toImplArray
<Vector<String>>(info[0], 1, info.GetIsolate(), exceptionState), exceptionState)
, return); |
| 71 } | 71 } |
| 72 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(s
tringSequenceSequenceArg); | 72 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(s
tringSequenceSequenceArg); |
| 73 v8::Local<v8::Object> wrapper = info.Holder(); | 73 v8::Local<v8::Object> wrapper = info.Holder(); |
| 74 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstructor2::
wrapperTypeInfo, wrapper); | 74 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstructor2::
wrapperTypeInfo, wrapper); |
| 75 v8SetReturnValue(info, wrapper); | 75 v8SetReturnValue(info, wrapper); |
| 76 } | 76 } |
| 77 | 77 |
| 78 static void constructor4(const v8::FunctionCallbackInfo<v8::Value>& info) | 78 static void constructor4(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 79 { | 79 { |
| 80 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor2", info.Holder(), info.GetIsolate()); | 80 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor2", info.Holder(), info.GetIsolate()); |
| 81 TestInterfaceEmpty* testInterfaceEmptyArg; | 81 TestInterfaceEmpty* testInterfaceEmptyArg; |
| 82 int longArg; | 82 int longArg; |
| 83 V8StringResource<> defaultUndefinedOptionalStringArg; | 83 V8StringResource<> defaultUndefinedOptionalStringArg; |
| 84 V8StringResource<> defaultNullStringOptionalStringArg; | 84 V8StringResource<> defaultNullStringOptionalStringArg; |
| 85 Dictionary defaultUndefinedOptionalDictionaryArg; | 85 Dictionary defaultUndefinedOptionalDictionaryArg; |
| 86 V8StringResource<> optionalStringArg; | 86 V8StringResource<> optionalStringArg; |
| 87 { | 87 { |
| 88 testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.G
etIsolate(), info[0]); | 88 testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.G
etIsolate(), info[0]); |
| 89 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[1], exceptio
nState), exceptionState); | 89 TONATIVE_CONVERT(convertAndThrow(longArg = toInt32(info[1], exceptionSta
te), exceptionState), return); |
| 90 TOSTRING_VOID_INTERNAL(defaultUndefinedOptionalStringArg, info[2]); | 90 TONATIVE_CONVERT((defaultUndefinedOptionalStringArg = info[2]).prepare()
, return); |
| 91 if (!info[3]->IsUndefined()) { | 91 if (!info[3]->IsUndefined()) { |
| 92 TOSTRING_VOID_INTERNAL(defaultNullStringOptionalStringArg, info[3]); | 92 TONATIVE_CONVERT((defaultNullStringOptionalStringArg = info[3]).prep
are(), return); |
| 93 } else { | 93 } else { |
| 94 defaultNullStringOptionalStringArg = nullptr; | 94 defaultNullStringOptionalStringArg = nullptr; |
| 95 } | 95 } |
| 96 if (!isUndefinedOrNull(info[4]) && !info[4]->IsObject()) { | 96 if (!isUndefinedOrNull(info[4]) && !info[4]->IsObject()) { |
| 97 exceptionState.throwTypeError("parameter 5 ('defaultUndefinedOptiona
lDictionaryArg') is not an object."); | 97 exceptionState.throwTypeError("parameter 5 ('defaultUndefinedOptiona
lDictionaryArg') is not an object."); |
| 98 exceptionState.throwIfNeeded(); | 98 exceptionState.throwIfNeeded(); |
| 99 return; | 99 return; |
| 100 } | 100 } |
| 101 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(defaultUndefinedOptionalDictionary
Arg, Dictionary(info[4], info.GetIsolate(), exceptionState), exceptionState); | 101 TONATIVE_CONVERT(convertAndThrow(defaultUndefinedOptionalDictionaryArg =
Dictionary(info[4], info.GetIsolate(), exceptionState), exceptionState), return
); |
| 102 if (UNLIKELY(info.Length() <= 5)) { | 102 if (UNLIKELY(info.Length() <= 5)) { |
| 103 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::
create(testInterfaceEmptyArg, longArg, defaultUndefinedOptionalStringArg, defaul
tNullStringOptionalStringArg, defaultUndefinedOptionalDictionaryArg); | 103 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::
create(testInterfaceEmptyArg, longArg, defaultUndefinedOptionalStringArg, defaul
tNullStringOptionalStringArg, defaultUndefinedOptionalDictionaryArg); |
| 104 v8::Local<v8::Object> wrapper = info.Holder(); | 104 v8::Local<v8::Object> wrapper = info.Holder(); |
| 105 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstr
uctor2::wrapperTypeInfo, wrapper); | 105 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstr
uctor2::wrapperTypeInfo, wrapper); |
| 106 v8SetReturnValue(info, wrapper); | 106 v8SetReturnValue(info, wrapper); |
| 107 return; | 107 return; |
| 108 } | 108 } |
| 109 TOSTRING_VOID_INTERNAL(optionalStringArg, info[5]); | 109 TONATIVE_CONVERT((optionalStringArg = info[5]).prepare(), return); |
| 110 } | 110 } |
| 111 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(t
estInterfaceEmptyArg, longArg, defaultUndefinedOptionalStringArg, defaultNullStr
ingOptionalStringArg, defaultUndefinedOptionalDictionaryArg, optionalStringArg); | 111 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(t
estInterfaceEmptyArg, longArg, defaultUndefinedOptionalStringArg, defaultNullStr
ingOptionalStringArg, defaultUndefinedOptionalDictionaryArg, optionalStringArg); |
| 112 v8::Local<v8::Object> wrapper = info.Holder(); | 112 v8::Local<v8::Object> wrapper = info.Holder(); |
| 113 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstructor2::
wrapperTypeInfo, wrapper); | 113 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstructor2::
wrapperTypeInfo, wrapper); |
| 114 v8SetReturnValue(info, wrapper); | 114 v8SetReturnValue(info, wrapper); |
| 115 } | 115 } |
| 116 | 116 |
| 117 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) | 117 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 118 { | 118 { |
| 119 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor2", info.Holder(), info.GetIsolate()); | 119 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor2", info.Holder(), info.GetIsolate()); |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 { | 233 { |
| 234 scriptWrappable->toImpl<TestInterfaceConstructor2>()->ref(); | 234 scriptWrappable->toImpl<TestInterfaceConstructor2>()->ref(); |
| 235 } | 235 } |
| 236 | 236 |
| 237 void V8TestInterfaceConstructor2::derefObject(ScriptWrappable* scriptWrappable) | 237 void V8TestInterfaceConstructor2::derefObject(ScriptWrappable* scriptWrappable) |
| 238 { | 238 { |
| 239 scriptWrappable->toImpl<TestInterfaceConstructor2>()->deref(); | 239 scriptWrappable->toImpl<TestInterfaceConstructor2>()->deref(); |
| 240 } | 240 } |
| 241 | 241 |
| 242 } // namespace blink | 242 } // namespace blink |
| OLD | NEW |