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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 TONATIVE_VOID_INTERNAL(dictionaryArg, Dictionary(info[0], info.GetIsolat
e())); |
56 if (!dictionaryArg.isUndefinedOrNull() && !dictionaryArg.isObject()) { | 56 if (!isUndefinedOrNull(info[0]) && !info[0]->IsObject()) { |
57 V8ThrowException::throwTypeError(ExceptionMessages::failedToConstruc
t("TestInterfaceConstructor2", "parameter 1 ('dictionaryArg') is not an object."
), info.GetIsolate()); | 57 V8ThrowException::throwTypeError(ExceptionMessages::failedToConstruc
t("TestInterfaceConstructor2", "parameter 1 ('dictionaryArg') is not an object."
), info.GetIsolate()); |
58 return; | 58 return; |
59 } | 59 } |
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 |
(...skipping 11 matching lines...) Expand all Loading... |
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 TONATIVE_VOID_INTERNAL(defaultUndefinedOptionalDictionaryArg, Dictionary
(info[4], info.GetIsolate())); |
88 if (!defaultUndefinedOptionalDictionaryArg.isUndefinedOrNull() && !defau
ltUndefinedOptionalDictionaryArg.isObject()) { | 88 if (!isUndefinedOrNull(info[4]) && !info[4]->IsObject()) { |
89 exceptionState.throwTypeError("parameter 5 ('defaultUndefinedOptiona
lDictionaryArg') is not an object."); | 89 exceptionState.throwTypeError("parameter 5 ('defaultUndefinedOptiona
lDictionaryArg') is not an object."); |
90 exceptionState.throwIfNeeded(); | 90 exceptionState.throwIfNeeded(); |
91 return; | 91 return; |
92 } | 92 } |
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; |
(...skipping 133 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 |