| 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 "RuntimeEnabledFeatures.h" | 10 #include "RuntimeEnabledFeatures.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 namespace WebCore { | 41 namespace WebCore { |
| 42 const WrapperTypeInfo V8TestInterfaceConstructor2::wrapperTypeInfo = { gin::kEmb
edderBlink, V8TestInterfaceConstructor2::domTemplate, V8TestInterfaceConstructor
2::derefObject, 0, 0, 0, V8TestInterfaceConstructor2::installPerContextEnabledMe
thods, 0, WrapperTypeObjectPrototype, RefCountedObject }; | 42 const WrapperTypeInfo V8TestInterfaceConstructor2::wrapperTypeInfo = { gin::kEmb
edderBlink, V8TestInterfaceConstructor2::domTemplate, V8TestInterfaceConstructor
2::derefObject, 0, 0, 0, V8TestInterfaceConstructor2::installPerContextEnabledMe
thods, 0, WrapperTypeObjectPrototype, RefCountedObject }; |
| 43 | 43 |
| 44 namespace TestInterfaceConstructor2V8Internal { | 44 namespace TestInterfaceConstructor2V8Internal { |
| 45 | 45 |
| 46 template <typename T> void V8_USE(T) { } | 46 template <typename T> void V8_USE(T) { } |
| 47 | 47 |
| 48 static void constructor1(const v8::FunctionCallbackInfo<v8::Value>& info) | 48 static void constructor1(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 49 { | 49 { |
| 50 v8::Isolate* isolate = info.GetIsolate(); | 50 v8::Isolate* isolate = info.GetIsolate(); |
| 51 TOSTRING_VOID(V8StringResource<>, stringArg, info[0]); | 51 V8StringResource<> stringArg; |
| 52 { |
| 53 v8::TryCatch block; |
| 54 TOSTRING_VOID_NO_DECL(stringArg, info[0]); |
| 55 } |
| 52 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(s
tringArg); | 56 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(s
tringArg); |
| 53 | 57 |
| 54 v8::Handle<v8::Object> wrapper = info.Holder(); | 58 v8::Handle<v8::Object> wrapper = info.Holder(); |
| 55 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor2>(impl.r
elease(), &V8TestInterfaceConstructor2::wrapperTypeInfo, wrapper, isolate, Wrapp
erConfiguration::Independent); | 59 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor2>(impl.r
elease(), &V8TestInterfaceConstructor2::wrapperTypeInfo, wrapper, isolate, Wrapp
erConfiguration::Independent); |
| 56 v8SetReturnValue(info, wrapper); | 60 v8SetReturnValue(info, wrapper); |
| 57 } | 61 } |
| 58 | 62 |
| 59 static void constructor2(const v8::FunctionCallbackInfo<v8::Value>& info) | 63 static void constructor2(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 60 { | 64 { |
| 61 v8::Isolate* isolate = info.GetIsolate(); | 65 v8::Isolate* isolate = info.GetIsolate(); |
| 62 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor2", info.Holder(), isolate); | 66 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor2", info.Holder(), isolate); |
| 63 TONATIVE_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceEmp
ty::toNativeWithTypeCheck(info.GetIsolate(), info[0])); | 67 TestInterfaceEmpty* testInterfaceEmptyArg; |
| 64 TONATIVE_VOID_EXCEPTIONSTATE(int, longArg, toInt32(info[1], exceptionState),
exceptionState); | 68 int longArg; |
| 65 TOSTRING_VOID(V8StringResource<>, defaultUndefinedOptionalStringArg, info[2]
); | 69 V8StringResource<> defaultUndefinedOptionalStringArg; |
| 66 TOSTRING_VOID(V8StringResource<>, defaultNullStringOptionalStringArg, argume
ntOrNull(info, 3)); | 70 V8StringResource<> defaultNullStringOptionalStringArg; |
| 67 TONATIVE_VOID(Dictionary, defaultUndefinedOptionalDictionaryArg, Dictionary(
info[4], info.GetIsolate())); | 71 Dictionary defaultUndefinedOptionalDictionaryArg; |
| 68 if (!defaultUndefinedOptionalDictionaryArg.isUndefinedOrNull() && !defaultUn
definedOptionalDictionaryArg.isObject()) { | 72 V8StringResource<> optionalStringArg; |
| 69 exceptionState.throwTypeError("parameter 5 ('defaultUndefinedOptionalDic
tionaryArg') is not an object."); | 73 { |
| 70 exceptionState.throwIfNeeded(); | 74 v8::TryCatch block; |
| 71 return; | 75 TONATIVE_VOID_NO_DECL(testInterfaceEmptyArg, V8TestInterfaceEmpty::toNat
iveWithTypeCheck(info.GetIsolate(), info[0])); |
| 76 TONATIVE_VOID_EXCEPTIONSTATE_NO_DECL(longArg, toInt32(info[1], exception
State), exceptionState); |
| 77 TOSTRING_VOID_NO_DECL(defaultUndefinedOptionalStringArg, info[2]); |
| 78 TOSTRING_VOID_NO_DECL(defaultNullStringOptionalStringArg, argumentOrNull
(info, 3)); |
| 79 TONATIVE_VOID_NO_DECL(defaultUndefinedOptionalDictionaryArg, Dictionary(
info[4], info.GetIsolate())); |
| 80 if (!defaultUndefinedOptionalDictionaryArg.isUndefinedOrNull() && !defau
ltUndefinedOptionalDictionaryArg.isObject()) { |
| 81 exceptionState.throwTypeError("parameter 5 ('defaultUndefinedOptiona
lDictionaryArg') is not an object."); |
| 82 exceptionState.throwIfNeeded(); |
| 83 return; |
| 84 } |
| 85 if (UNLIKELY(info.Length() <= 5)) { |
| 86 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::
create(testInterfaceEmptyArg, longArg, defaultUndefinedOptionalStringArg, defaul
tNullStringOptionalStringArg, defaultUndefinedOptionalDictionaryArg); |
| 87 v8::Handle<v8::Object> wrapper = info.Holder(); |
| 88 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor2
>(impl.release(), &V8TestInterfaceConstructor2::wrapperTypeInfo, wrapper, isolat
e, WrapperConfiguration::Independent); |
| 89 v8SetReturnValue(info, wrapper); |
| 90 return; |
| 91 } |
| 92 TOSTRING_VOID_NO_DECL(optionalStringArg, info[5]); |
| 72 } | 93 } |
| 73 if (UNLIKELY(info.Length() <= 5)) { | |
| 74 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::crea
te(testInterfaceEmptyArg, longArg, defaultUndefinedOptionalStringArg, defaultNul
lStringOptionalStringArg, defaultUndefinedOptionalDictionaryArg); | |
| 75 v8::Handle<v8::Object> wrapper = info.Holder(); | |
| 76 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor2>(im
pl.release(), &V8TestInterfaceConstructor2::wrapperTypeInfo, wrapper, isolate, W
rapperConfiguration::Independent); | |
| 77 v8SetReturnValue(info, wrapper); | |
| 78 return; | |
| 79 } | |
| 80 TOSTRING_VOID(V8StringResource<>, optionalStringArg, info[5]); | |
| 81 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(t
estInterfaceEmptyArg, longArg, defaultUndefinedOptionalStringArg, defaultNullStr
ingOptionalStringArg, defaultUndefinedOptionalDictionaryArg, optionalStringArg); | 94 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(t
estInterfaceEmptyArg, longArg, defaultUndefinedOptionalStringArg, defaultNullStr
ingOptionalStringArg, defaultUndefinedOptionalDictionaryArg, optionalStringArg); |
| 82 | 95 |
| 83 v8::Handle<v8::Object> wrapper = info.Holder(); | 96 v8::Handle<v8::Object> wrapper = info.Holder(); |
| 84 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor2>(impl.r
elease(), &V8TestInterfaceConstructor2::wrapperTypeInfo, wrapper, isolate, Wrapp
erConfiguration::Independent); | 97 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor2>(impl.r
elease(), &V8TestInterfaceConstructor2::wrapperTypeInfo, wrapper, isolate, Wrapp
erConfiguration::Independent); |
| 85 v8SetReturnValue(info, wrapper); | 98 v8SetReturnValue(info, wrapper); |
| 86 } | 99 } |
| 87 | 100 |
| 88 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) | 101 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 89 { | 102 { |
| 90 if (((info.Length() == 1))) { | 103 if (((info.Length() == 1))) { |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 fromInternalPointer(object)->deref(); | 209 fromInternalPointer(object)->deref(); |
| 197 } | 210 } |
| 198 | 211 |
| 199 template<> | 212 template<> |
| 200 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor2* impl, v8::Handle<v
8::Object> creationContext, v8::Isolate* isolate) | 213 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor2* impl, v8::Handle<v
8::Object> creationContext, v8::Isolate* isolate) |
| 201 { | 214 { |
| 202 return toV8(impl, creationContext, isolate); | 215 return toV8(impl, creationContext, isolate); |
| 203 } | 216 } |
| 204 | 217 |
| 205 } // namespace WebCore | 218 } // namespace WebCore |
| OLD | NEW |