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 TOSTRING_VOID_INTERNAL(stringArg, info[0]); |
| 54 } |
52 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(s
tringArg); | 55 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(s
tringArg); |
53 | 56 |
54 v8::Handle<v8::Object> wrapper = info.Holder(); | 57 v8::Handle<v8::Object> wrapper = info.Holder(); |
55 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor2>(impl.r
elease(), &V8TestInterfaceConstructor2::wrapperTypeInfo, wrapper, isolate, Wrapp
erConfiguration::Independent); | 58 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor2>(impl.r
elease(), &V8TestInterfaceConstructor2::wrapperTypeInfo, wrapper, isolate, Wrapp
erConfiguration::Independent); |
56 v8SetReturnValue(info, wrapper); | 59 v8SetReturnValue(info, wrapper); |
57 } | 60 } |
58 | 61 |
59 static void constructor2(const v8::FunctionCallbackInfo<v8::Value>& info) | 62 static void constructor2(const v8::FunctionCallbackInfo<v8::Value>& info) |
60 { | 63 { |
61 v8::Isolate* isolate = info.GetIsolate(); | 64 v8::Isolate* isolate = info.GetIsolate(); |
62 TONATIVE_VOID(Dictionary, dictionaryArg, Dictionary(info[0], info.GetIsolate
())); | 65 Dictionary dictionaryArg; |
63 if (!dictionaryArg.isUndefinedOrNull() && !dictionaryArg.isObject()) { | 66 { |
64 throwTypeError(ExceptionMessages::failedToConstruct("TestInterfaceConstr
uctor2", "parameter 1 ('dictionaryArg') is not an object."), info.GetIsolate()); | 67 v8::TryCatch block; |
65 return; | 68 TONATIVE_VOID_INTERNAL(dictionaryArg, Dictionary(info[0], info.GetIsolat
e())); |
| 69 if (!dictionaryArg.isUndefinedOrNull() && !dictionaryArg.isObject()) { |
| 70 throwTypeError(ExceptionMessages::failedToConstruct("TestInterfaceCo
nstructor2", "parameter 1 ('dictionaryArg') is not an object."), info.GetIsolate
()); |
| 71 block.ReThrow(); |
| 72 return; |
| 73 } |
66 } | 74 } |
67 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(d
ictionaryArg); | 75 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(d
ictionaryArg); |
68 | 76 |
69 v8::Handle<v8::Object> wrapper = info.Holder(); | 77 v8::Handle<v8::Object> wrapper = info.Holder(); |
70 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor2>(impl.r
elease(), &V8TestInterfaceConstructor2::wrapperTypeInfo, wrapper, isolate, Wrapp
erConfiguration::Independent); | 78 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor2>(impl.r
elease(), &V8TestInterfaceConstructor2::wrapperTypeInfo, wrapper, isolate, Wrapp
erConfiguration::Independent); |
71 v8SetReturnValue(info, wrapper); | 79 v8SetReturnValue(info, wrapper); |
72 } | 80 } |
73 | 81 |
74 static void constructor3(const v8::FunctionCallbackInfo<v8::Value>& info) | 82 static void constructor3(const v8::FunctionCallbackInfo<v8::Value>& info) |
75 { | 83 { |
76 v8::Isolate* isolate = info.GetIsolate(); | 84 v8::Isolate* isolate = info.GetIsolate(); |
77 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor2", info.Holder(), isolate); | 85 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor2", info.Holder(), isolate); |
78 TONATIVE_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceEmp
ty::toNativeWithTypeCheck(info.GetIsolate(), info[0])); | 86 TestInterfaceEmpty* testInterfaceEmptyArg; |
79 TONATIVE_VOID_EXCEPTIONSTATE(int, longArg, toInt32(info[1], exceptionState),
exceptionState); | 87 int longArg; |
80 TOSTRING_VOID(V8StringResource<>, defaultUndefinedOptionalStringArg, info[2]
); | 88 V8StringResource<> defaultUndefinedOptionalStringArg; |
81 TOSTRING_VOID(V8StringResource<>, defaultNullStringOptionalStringArg, argume
ntOrNull(info, 3)); | 89 V8StringResource<> defaultNullStringOptionalStringArg; |
82 TONATIVE_VOID(Dictionary, defaultUndefinedOptionalDictionaryArg, Dictionary(
info[4], info.GetIsolate())); | 90 Dictionary defaultUndefinedOptionalDictionaryArg; |
83 if (!defaultUndefinedOptionalDictionaryArg.isUndefinedOrNull() && !defaultUn
definedOptionalDictionaryArg.isObject()) { | 91 V8StringResource<> optionalStringArg; |
84 exceptionState.throwTypeError("parameter 5 ('defaultUndefinedOptionalDic
tionaryArg') is not an object."); | 92 { |
85 exceptionState.throwIfNeeded(); | 93 v8::TryCatch block; |
86 return; | 94 TONATIVE_VOID_INTERNAL(testInterfaceEmptyArg, V8TestInterfaceEmpty::toNa
tiveWithTypeCheck(info.GetIsolate(), info[0])); |
| 95 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[1], exceptio
nState), exceptionState); |
| 96 TOSTRING_VOID_INTERNAL_RETHROW(defaultUndefinedOptionalStringArg, info[2
], block); |
| 97 TOSTRING_VOID_INTERNAL_RETHROW(defaultNullStringOptionalStringArg, argum
entOrNull(info, 3), block); |
| 98 TONATIVE_VOID_INTERNAL(defaultUndefinedOptionalDictionaryArg, Dictionary
(info[4], info.GetIsolate())); |
| 99 if (!defaultUndefinedOptionalDictionaryArg.isUndefinedOrNull() && !defau
ltUndefinedOptionalDictionaryArg.isObject()) { |
| 100 exceptionState.throwTypeError("parameter 5 ('defaultUndefinedOptiona
lDictionaryArg') is not an object."); |
| 101 exceptionState.throwIfNeeded(); |
| 102 block.ReThrow(); |
| 103 return; |
| 104 } |
| 105 if (UNLIKELY(info.Length() <= 5)) { |
| 106 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::
create(testInterfaceEmptyArg, longArg, defaultUndefinedOptionalStringArg, defaul
tNullStringOptionalStringArg, defaultUndefinedOptionalDictionaryArg); |
| 107 v8::Handle<v8::Object> wrapper = info.Holder(); |
| 108 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor2
>(impl.release(), &V8TestInterfaceConstructor2::wrapperTypeInfo, wrapper, isolat
e, WrapperConfiguration::Independent); |
| 109 v8SetReturnValue(info, wrapper); |
| 110 return; |
| 111 } |
| 112 TOSTRING_VOID_INTERNAL_RETHROW(optionalStringArg, info[5], block); |
87 } | 113 } |
88 if (UNLIKELY(info.Length() <= 5)) { | |
89 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::crea
te(testInterfaceEmptyArg, longArg, defaultUndefinedOptionalStringArg, defaultNul
lStringOptionalStringArg, defaultUndefinedOptionalDictionaryArg); | |
90 v8::Handle<v8::Object> wrapper = info.Holder(); | |
91 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor2>(im
pl.release(), &V8TestInterfaceConstructor2::wrapperTypeInfo, wrapper, isolate, W
rapperConfiguration::Independent); | |
92 v8SetReturnValue(info, wrapper); | |
93 return; | |
94 } | |
95 TOSTRING_VOID(V8StringResource<>, optionalStringArg, info[5]); | |
96 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(t
estInterfaceEmptyArg, longArg, defaultUndefinedOptionalStringArg, defaultNullStr
ingOptionalStringArg, defaultUndefinedOptionalDictionaryArg, optionalStringArg); | 114 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(t
estInterfaceEmptyArg, longArg, defaultUndefinedOptionalStringArg, defaultNullStr
ingOptionalStringArg, defaultUndefinedOptionalDictionaryArg, optionalStringArg); |
97 | 115 |
98 v8::Handle<v8::Object> wrapper = info.Holder(); | 116 v8::Handle<v8::Object> wrapper = info.Holder(); |
99 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor2>(impl.r
elease(), &V8TestInterfaceConstructor2::wrapperTypeInfo, wrapper, isolate, Wrapp
erConfiguration::Independent); | 117 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor2>(impl.r
elease(), &V8TestInterfaceConstructor2::wrapperTypeInfo, wrapper, isolate, Wrapp
erConfiguration::Independent); |
100 v8SetReturnValue(info, wrapper); | 118 v8SetReturnValue(info, wrapper); |
101 } | 119 } |
102 | 120 |
103 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) | 121 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) |
104 { | 122 { |
105 v8::Isolate* isolate = info.GetIsolate(); | 123 v8::Isolate* isolate = info.GetIsolate(); |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 fromInternalPointer(object)->deref(); | 263 fromInternalPointer(object)->deref(); |
246 } | 264 } |
247 | 265 |
248 template<> | 266 template<> |
249 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor2* impl, v8::Handle<v
8::Object> creationContext, v8::Isolate* isolate) | 267 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor2* impl, v8::Handle<v
8::Object> creationContext, v8::Isolate* isolate) |
250 { | 268 { |
251 return toV8(impl, creationContext, isolate); | 269 return toV8(impl, creationContext, isolate); |
252 } | 270 } |
253 | 271 |
254 } // namespace WebCore | 272 } // namespace WebCore |
OLD | NEW |