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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 impl->associateWithWrapper(&V8TestInterfaceConstructor2::wrapperTypeInfo, wr
apper, info.GetIsolate()); | 45 impl->associateWithWrapper(&V8TestInterfaceConstructor2::wrapperTypeInfo, wr
apper, info.GetIsolate()); |
46 v8SetReturnValue(info, wrapper); | 46 v8SetReturnValue(info, wrapper); |
47 } | 47 } |
48 | 48 |
49 static void constructor2(const v8::FunctionCallbackInfo<v8::Value>& info) | 49 static void constructor2(const v8::FunctionCallbackInfo<v8::Value>& info) |
50 { | 50 { |
51 Dictionary dictionaryArg; | 51 Dictionary dictionaryArg; |
52 { | 52 { |
53 v8::TryCatch block; | 53 v8::TryCatch block; |
54 V8RethrowTryCatchScope rethrow(block); | 54 V8RethrowTryCatchScope rethrow(block); |
55 TONATIVE_VOID_INTERNAL(dictionaryArg, Dictionary(info[0], info.GetIsolat
e())); | 55 if (!isUndefinedOrNull(info[0]) && !info[0]->IsObject()) { |
56 if (!dictionaryArg.isUndefinedOrNull() && !dictionaryArg.isObject()) { | |
57 V8ThrowException::throwTypeError(ExceptionMessages::failedToConstruc
t("TestInterfaceConstructor2", "parameter 1 ('dictionaryArg') is not an object."
), info.GetIsolate()); | 56 V8ThrowException::throwTypeError(ExceptionMessages::failedToConstruc
t("TestInterfaceConstructor2", "parameter 1 ('dictionaryArg') is not an object."
), info.GetIsolate()); |
58 return; | 57 return; |
59 } | 58 } |
| 59 TONATIVE_VOID_INTERNAL(dictionaryArg, Dictionary(info[0], info.GetIsolat
e())); |
60 } | 60 } |
61 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(d
ictionaryArg); | 61 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(d
ictionaryArg); |
62 v8::Handle<v8::Object> wrapper = info.Holder(); | 62 v8::Handle<v8::Object> wrapper = info.Holder(); |
63 impl->associateWithWrapper(&V8TestInterfaceConstructor2::wrapperTypeInfo, wr
apper, info.GetIsolate()); | 63 impl->associateWithWrapper(&V8TestInterfaceConstructor2::wrapperTypeInfo, wr
apper, info.GetIsolate()); |
64 v8SetReturnValue(info, wrapper); | 64 v8SetReturnValue(info, wrapper); |
65 } | 65 } |
66 | 66 |
67 static void constructor3(const v8::FunctionCallbackInfo<v8::Value>& info) | 67 static void constructor3(const v8::FunctionCallbackInfo<v8::Value>& info) |
68 { | 68 { |
69 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor2", info.Holder(), info.GetIsolate()); | 69 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor2", info.Holder(), info.GetIsolate()); |
70 TestInterfaceEmpty* testInterfaceEmptyArg; | 70 TestInterfaceEmpty* testInterfaceEmptyArg; |
71 int longArg; | 71 int longArg; |
72 V8StringResource<> defaultUndefinedOptionalStringArg; | 72 V8StringResource<> defaultUndefinedOptionalStringArg; |
73 V8StringResource<> defaultNullStringOptionalStringArg; | 73 V8StringResource<> defaultNullStringOptionalStringArg; |
74 Dictionary defaultUndefinedOptionalDictionaryArg; | 74 Dictionary defaultUndefinedOptionalDictionaryArg; |
75 V8StringResource<> optionalStringArg; | 75 V8StringResource<> optionalStringArg; |
76 { | 76 { |
77 v8::TryCatch block; | 77 v8::TryCatch block; |
78 V8RethrowTryCatchScope rethrow(block); | 78 V8RethrowTryCatchScope rethrow(block); |
79 TONATIVE_VOID_INTERNAL(testInterfaceEmptyArg, V8TestInterfaceEmpty::toIm
plWithTypeCheck(info.GetIsolate(), info[0])); | 79 TONATIVE_VOID_INTERNAL(testInterfaceEmptyArg, V8TestInterfaceEmpty::toIm
plWithTypeCheck(info.GetIsolate(), info[0])); |
80 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[1], exceptio
nState), exceptionState); | 80 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[1], exceptio
nState), exceptionState); |
81 TOSTRING_VOID_INTERNAL(defaultUndefinedOptionalStringArg, info[2]); | 81 TOSTRING_VOID_INTERNAL(defaultUndefinedOptionalStringArg, info[2]); |
82 if (!info[3]->IsUndefined()) { | 82 if (!info[3]->IsUndefined()) { |
83 TOSTRING_VOID_INTERNAL(defaultNullStringOptionalStringArg, info[3]); | 83 TOSTRING_VOID_INTERNAL(defaultNullStringOptionalStringArg, info[3]); |
84 } else { | 84 } else { |
85 defaultNullStringOptionalStringArg = nullptr; | 85 defaultNullStringOptionalStringArg = nullptr; |
86 } | 86 } |
87 TONATIVE_VOID_INTERNAL(defaultUndefinedOptionalDictionaryArg, Dictionary
(info[4], info.GetIsolate())); | 87 if (!isUndefinedOrNull(info[4]) && !info[4]->IsObject()) { |
88 if (!defaultUndefinedOptionalDictionaryArg.isUndefinedOrNull() && !defau
ltUndefinedOptionalDictionaryArg.isObject()) { | |
89 exceptionState.throwTypeError("parameter 5 ('defaultUndefinedOptiona
lDictionaryArg') is not an object."); | 88 exceptionState.throwTypeError("parameter 5 ('defaultUndefinedOptiona
lDictionaryArg') is not an object."); |
90 exceptionState.throwIfNeeded(); | 89 exceptionState.throwIfNeeded(); |
91 return; | 90 return; |
92 } | 91 } |
| 92 TONATIVE_VOID_INTERNAL(defaultUndefinedOptionalDictionaryArg, Dictionary
(info[4], info.GetIsolate())); |
93 if (UNLIKELY(info.Length() <= 5)) { | 93 if (UNLIKELY(info.Length() <= 5)) { |
94 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::
create(testInterfaceEmptyArg, longArg, defaultUndefinedOptionalStringArg, defaul
tNullStringOptionalStringArg, defaultUndefinedOptionalDictionaryArg); | 94 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::
create(testInterfaceEmptyArg, longArg, defaultUndefinedOptionalStringArg, defaul
tNullStringOptionalStringArg, defaultUndefinedOptionalDictionaryArg); |
95 v8::Handle<v8::Object> wrapper = info.Holder(); | 95 v8::Handle<v8::Object> wrapper = info.Holder(); |
96 impl->associateWithWrapper(&V8TestInterfaceConstructor2::wrapperType
Info, wrapper, info.GetIsolate()); | 96 impl->associateWithWrapper(&V8TestInterfaceConstructor2::wrapperType
Info, wrapper, info.GetIsolate()); |
97 v8SetReturnValue(info, wrapper); | 97 v8SetReturnValue(info, wrapper); |
98 return; | 98 return; |
99 } | 99 } |
100 TOSTRING_VOID_INTERNAL(optionalStringArg, info[5]); | 100 TOSTRING_VOID_INTERNAL(optionalStringArg, info[5]); |
101 } | 101 } |
102 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(t
estInterfaceEmptyArg, longArg, defaultUndefinedOptionalStringArg, defaultNullStr
ingOptionalStringArg, defaultUndefinedOptionalDictionaryArg, optionalStringArg); | 102 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(t
estInterfaceEmptyArg, longArg, defaultUndefinedOptionalStringArg, defaultNullStr
ingOptionalStringArg, defaultUndefinedOptionalDictionaryArg, optionalStringArg); |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 return 0; | 232 return 0; |
233 } | 233 } |
234 | 234 |
235 template<> | 235 template<> |
236 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor2* impl, v8::Handle<v
8::Object> creationContext, v8::Isolate* isolate) | 236 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor2* impl, v8::Handle<v
8::Object> creationContext, v8::Isolate* isolate) |
237 { | 237 { |
238 return toV8(impl, creationContext, isolate); | 238 return toV8(impl, creationContext, isolate); |
239 } | 239 } |
240 | 240 |
241 } // namespace blink | 241 } // namespace blink |
OLD | NEW |