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 "V8TestInterfaceConstructor.h" | 8 #include "V8TestInterfaceConstructor.h" |
9 | 9 |
10 #include "RuntimeEnabledFeatures.h" | 10 #include "RuntimeEnabledFeatures.h" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 | 58 |
59 v8::Handle<v8::Object> wrapper = info.Holder(); | 59 v8::Handle<v8::Object> wrapper = info.Holder(); |
60 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor>(impl.re
lease(), &V8TestInterfaceConstructor::wrapperTypeInfo, wrapper, isolate, Wrapper
Configuration::Independent); | 60 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor>(impl.re
lease(), &V8TestInterfaceConstructor::wrapperTypeInfo, wrapper, isolate, Wrapper
Configuration::Independent); |
61 v8SetReturnValue(info, wrapper); | 61 v8SetReturnValue(info, wrapper); |
62 } | 62 } |
63 | 63 |
64 static void constructor2(const v8::FunctionCallbackInfo<v8::Value>& info) | 64 static void constructor2(const v8::FunctionCallbackInfo<v8::Value>& info) |
65 { | 65 { |
66 v8::Isolate* isolate = info.GetIsolate(); | 66 v8::Isolate* isolate = info.GetIsolate(); |
67 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor", info.Holder(), isolate); | 67 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor", info.Holder(), isolate); |
68 TONATIVE_VOID(double, doubleArg, static_cast<double>(info[0]->NumberValue())
); | 68 double doubleArg; |
69 TOSTRING_VOID(V8StringResource<>, stringArg, info[1]); | 69 V8StringResource<> stringArg; |
70 TONATIVE_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceEmp
ty::toNativeWithTypeCheck(info.GetIsolate(), info[2])); | 70 TestInterfaceEmpty* testInterfaceEmptyArg; |
71 TONATIVE_VOID(Dictionary, dictionaryArg, Dictionary(info[3], info.GetIsolate
())); | 71 Dictionary dictionaryArg; |
72 if (!dictionaryArg.isUndefinedOrNull() && !dictionaryArg.isObject()) { | 72 Vector<String> sequenceStringArg; |
73 exceptionState.throwTypeError("parameter 4 ('dictionaryArg') is not an o
bject."); | 73 Vector<Dictionary> sequenceDictionaryArg; |
74 exceptionState.throwIfNeeded(); | 74 Dictionary optionalDictionaryArg; |
75 return; | 75 TestInterfaceEmpty* optionalTestInterfaceEmptyArg; |
| 76 { |
| 77 v8::TryCatch block; |
| 78 TONATIVE_VOID_INTERNAL(doubleArg, static_cast<double>(info[0]->NumberVal
ue())); |
| 79 TOSTRING_VOID_INTERNAL_RETHROW(stringArg, info[1], block); |
| 80 TONATIVE_VOID_INTERNAL(testInterfaceEmptyArg, V8TestInterfaceEmpty::toNa
tiveWithTypeCheck(info.GetIsolate(), info[2])); |
| 81 TONATIVE_VOID_INTERNAL(dictionaryArg, Dictionary(info[3], info.GetIsolat
e())); |
| 82 if (!dictionaryArg.isUndefinedOrNull() && !dictionaryArg.isObject()) { |
| 83 exceptionState.throwTypeError("parameter 4 ('dictionaryArg') is not
an object."); |
| 84 exceptionState.throwIfNeeded(); |
| 85 block.ReThrow(); |
| 86 return; |
| 87 } |
| 88 TONATIVE_VOID_INTERNAL(sequenceStringArg, toNativeArray<String>(info[4],
5, info.GetIsolate())); |
| 89 TONATIVE_VOID_INTERNAL(sequenceDictionaryArg, toNativeArray<Dictionary>(
info[5], 6, info.GetIsolate())); |
| 90 TONATIVE_VOID_INTERNAL(optionalDictionaryArg, Dictionary(info[6], info.G
etIsolate())); |
| 91 if (!optionalDictionaryArg.isUndefinedOrNull() && !optionalDictionaryArg
.isObject()) { |
| 92 exceptionState.throwTypeError("parameter 7 ('optionalDictionaryArg')
is not an object."); |
| 93 exceptionState.throwIfNeeded(); |
| 94 block.ReThrow(); |
| 95 return; |
| 96 } |
| 97 TONATIVE_VOID_INTERNAL(optionalTestInterfaceEmptyArg, V8TestInterfaceEmp
ty::toNativeWithTypeCheck(info.GetIsolate(), info[7])); |
76 } | 98 } |
77 TONATIVE_VOID(Vector<String>, sequenceStringArg, toNativeArray<String>(info[
4], 5, info.GetIsolate())); | |
78 TONATIVE_VOID(Vector<Dictionary>, sequenceDictionaryArg, toNativeArray<Dicti
onary>(info[5], 6, info.GetIsolate())); | |
79 TONATIVE_VOID(Dictionary, optionalDictionaryArg, Dictionary(info[6], info.Ge
tIsolate())); | |
80 if (!optionalDictionaryArg.isUndefinedOrNull() && !optionalDictionaryArg.isO
bject()) { | |
81 exceptionState.throwTypeError("parameter 7 ('optionalDictionaryArg') is
not an object."); | |
82 exceptionState.throwIfNeeded(); | |
83 return; | |
84 } | |
85 TONATIVE_VOID(TestInterfaceEmpty*, optionalTestInterfaceEmptyArg, V8TestInte
rfaceEmpty::toNativeWithTypeCheck(info.GetIsolate(), info[7])); | |
86 ExecutionContext* context = currentExecutionContext(isolate); | 99 ExecutionContext* context = currentExecutionContext(isolate); |
87 Document& document = *toDocument(currentExecutionContext(isolate)); | 100 Document& document = *toDocument(currentExecutionContext(isolate)); |
88 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::create(con
text, document, doubleArg, stringArg, testInterfaceEmptyArg, dictionaryArg, sequ
enceStringArg, sequenceDictionaryArg, optionalDictionaryArg, optionalTestInterfa
ceEmptyArg, exceptionState); | 101 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::create(con
text, document, doubleArg, stringArg, testInterfaceEmptyArg, dictionaryArg, sequ
enceStringArg, sequenceDictionaryArg, optionalDictionaryArg, optionalTestInterfa
ceEmptyArg, exceptionState); |
89 if (exceptionState.throwIfNeeded()) | 102 if (exceptionState.throwIfNeeded()) |
90 return; | 103 return; |
91 | 104 |
92 v8::Handle<v8::Object> wrapper = info.Holder(); | 105 v8::Handle<v8::Object> wrapper = info.Holder(); |
93 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor>(impl.re
lease(), &V8TestInterfaceConstructor::wrapperTypeInfo, wrapper, isolate, Wrapper
Configuration::Independent); | 106 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor>(impl.re
lease(), &V8TestInterfaceConstructor::wrapperTypeInfo, wrapper, isolate, Wrapper
Configuration::Independent); |
94 v8SetReturnValue(info, wrapper); | 107 v8SetReturnValue(info, wrapper); |
95 } | 108 } |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 fromInternalPointer(object)->deref(); | 241 fromInternalPointer(object)->deref(); |
229 } | 242 } |
230 | 243 |
231 template<> | 244 template<> |
232 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor* impl, v8::Handle<v8
::Object> creationContext, v8::Isolate* isolate) | 245 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor* impl, v8::Handle<v8
::Object> creationContext, v8::Isolate* isolate) |
233 { | 246 { |
234 return toV8(impl, creationContext, isolate); | 247 return toV8(impl, creationContext, isolate); |
235 } | 248 } |
236 | 249 |
237 } // namespace WebCore | 250 } // namespace WebCore |
OLD | NEW |