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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceE
mpty::toNativeWithTypeCheck(info.GetIsolate(), info[0])); | 63 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceE
mpty::toNativeWithTypeCheck(info.GetIsolate(), info[0])); |
64 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[1], exceptionState), ex
ceptionState); | 64 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[1], exceptionState), ex
ceptionState); |
65 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, defaultUndefinedOpt
ionalStringArg, info[2]); | 65 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, defaultUndefinedOpt
ionalStringArg, info[2]); |
66 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, defaultNullStringOp
tionalStringArg, argumentOrNull(info, 3)); | 66 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, defaultNullStringOp
tionalStringArg, argumentOrNull(info, 3)); |
67 V8TRYCATCH_VOID(Dictionary, defaultUndefinedOptionalDictionaryArg, Dictionar
y(info[4], info.GetIsolate())); | 67 V8TRYCATCH_VOID(Dictionary, defaultUndefinedOptionalDictionaryArg, Dictionar
y(info[4], info.GetIsolate())); |
68 if (!defaultUndefinedOptionalDictionaryArg.isUndefinedOrNull() && !defaultUn
definedOptionalDictionaryArg.isObject()) { | 68 if (!defaultUndefinedOptionalDictionaryArg.isUndefinedOrNull() && !defaultUn
definedOptionalDictionaryArg.isObject()) { |
69 exceptionState.throwTypeError("parameter 5 ('defaultUndefinedOptionalDic
tionaryArg') is not an object."); | 69 exceptionState.throwTypeError("parameter 5 ('defaultUndefinedOptionalDic
tionaryArg') is not an object."); |
70 exceptionState.throwIfNeeded(); | 70 exceptionState.throwIfNeeded(); |
71 return; | 71 return; |
72 } | 72 } |
73 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(t
estInterfaceEmptyArg, longArg, defaultUndefinedOptionalStringArg, defaultNullStr
ingOptionalStringArg, defaultUndefinedOptionalDictionaryArg); | 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 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, optionalStringArg,
info[5]); |
| 81 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(t
estInterfaceEmptyArg, longArg, defaultUndefinedOptionalStringArg, defaultNullStr
ingOptionalStringArg, defaultUndefinedOptionalDictionaryArg, optionalStringArg); |
74 | 82 |
75 v8::Handle<v8::Object> wrapper = info.Holder(); | 83 v8::Handle<v8::Object> wrapper = info.Holder(); |
76 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor2>(impl.r
elease(), &V8TestInterfaceConstructor2::wrapperTypeInfo, wrapper, isolate, Wrapp
erConfiguration::Independent); | 84 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor2>(impl.r
elease(), &V8TestInterfaceConstructor2::wrapperTypeInfo, wrapper, isolate, Wrapp
erConfiguration::Independent); |
77 v8SetReturnValue(info, wrapper); | 85 v8SetReturnValue(info, wrapper); |
78 } | 86 } |
79 | 87 |
80 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) | 88 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) |
81 { | 89 { |
82 if (((info.Length() == 1))) { | 90 if (((info.Length() == 1))) { |
83 TestInterfaceConstructor2V8Internal::constructor1(info); | 91 TestInterfaceConstructor2V8Internal::constructor1(info); |
84 return; | 92 return; |
85 } | 93 } |
86 if (((info.Length() == 2) && (V8TestInterfaceEmpty::hasInstance(info[0], inf
o.GetIsolate()))) || ((info.Length() == 3) && (V8TestInterfaceEmpty::hasInstance
(info[0], info.GetIsolate()))) || ((info.Length() == 4) && (V8TestInterfaceEmpty
::hasInstance(info[0], info.GetIsolate()))) || ((info.Length() == 5) && (V8TestI
nterfaceEmpty::hasInstance(info[0], info.GetIsolate())) && (info[4]->IsUndefined
() || info[4]->IsObject()))) { | 94 if (((info.Length() == 2) && (V8TestInterfaceEmpty::hasInstance(info[0], inf
o.GetIsolate()))) || ((info.Length() == 3) && (V8TestInterfaceEmpty::hasInstance
(info[0], info.GetIsolate()))) || ((info.Length() == 4) && (V8TestInterfaceEmpty
::hasInstance(info[0], info.GetIsolate()))) || ((info.Length() == 5) && (V8TestI
nterfaceEmpty::hasInstance(info[0], info.GetIsolate())) && (info[4]->IsUndefined
() || info[4]->IsObject())) || ((info.Length() == 6) && (V8TestInterfaceEmpty::h
asInstance(info[0], info.GetIsolate())) && (info[4]->IsUndefined() || info[4]->I
sObject()))) { |
87 TestInterfaceConstructor2V8Internal::constructor2(info); | 95 TestInterfaceConstructor2V8Internal::constructor2(info); |
88 return; | 96 return; |
89 } | 97 } |
90 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor2", info.Holder(), info.GetIsolate()); | 98 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor2", info.Holder(), info.GetIsolate()); |
91 if (UNLIKELY(info.Length() < 1)) { | 99 if (UNLIKELY(info.Length() < 1)) { |
92 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 100 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
93 exceptionState.throwIfNeeded(); | 101 exceptionState.throwIfNeeded(); |
94 return; | 102 return; |
95 } | 103 } |
96 exceptionState.throwTypeError("No matching constructor signature."); | 104 exceptionState.throwTypeError("No matching constructor signature."); |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 fromInternalPointer(object)->deref(); | 196 fromInternalPointer(object)->deref(); |
189 } | 197 } |
190 | 198 |
191 template<> | 199 template<> |
192 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor2* impl, v8::Handle<v
8::Object> creationContext, v8::Isolate* isolate) | 200 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor2* impl, v8::Handle<v
8::Object> creationContext, v8::Isolate* isolate) |
193 { | 201 { |
194 return toV8(impl, creationContext, isolate); | 202 return toV8(impl, creationContext, isolate); |
195 } | 203 } |
196 | 204 |
197 } // namespace WebCore | 205 } // namespace WebCore |
OLD | NEW |