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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 template <typename T> void V8_USE(T) { } | 49 template <typename T> void V8_USE(T) { } |
50 | 50 |
51 static void constructor1(const v8::FunctionCallbackInfo<v8::Value>& info) | 51 static void constructor1(const v8::FunctionCallbackInfo<v8::Value>& info) |
52 { | 52 { |
53 V8StringResource<> stringArg; | 53 V8StringResource<> stringArg; |
54 { | 54 { |
55 TOSTRING_VOID_INTERNAL(stringArg, info[0]); | 55 TOSTRING_VOID_INTERNAL(stringArg, info[0]); |
56 } | 56 } |
57 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(s
tringArg); | 57 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(s
tringArg); |
58 v8::Handle<v8::Object> wrapper = info.Holder(); | 58 v8::Handle<v8::Object> wrapper = info.Holder(); |
59 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor2>(impl.r
elease(), &V8TestInterfaceConstructor2::wrapperTypeInfo, wrapper, info.GetIsolat
e()); | 59 impl.get()->associateWithWrapper(&V8TestInterfaceConstructor2::wrapperTypeIn
fo, wrapper, info.GetIsolate()); |
60 v8SetReturnValue(info, wrapper); | 60 v8SetReturnValue(info, wrapper); |
61 } | 61 } |
62 | 62 |
63 static void constructor2(const v8::FunctionCallbackInfo<v8::Value>& info) | 63 static void constructor2(const v8::FunctionCallbackInfo<v8::Value>& info) |
64 { | 64 { |
65 Dictionary dictionaryArg; | 65 Dictionary dictionaryArg; |
66 { | 66 { |
67 v8::TryCatch block; | 67 v8::TryCatch block; |
68 V8RethrowTryCatchScope rethrow(block); | 68 V8RethrowTryCatchScope rethrow(block); |
69 TONATIVE_VOID_INTERNAL(dictionaryArg, Dictionary(info[0], info.GetIsolat
e())); | 69 TONATIVE_VOID_INTERNAL(dictionaryArg, Dictionary(info[0], info.GetIsolat
e())); |
70 if (!dictionaryArg.isUndefinedOrNull() && !dictionaryArg.isObject()) { | 70 if (!dictionaryArg.isUndefinedOrNull() && !dictionaryArg.isObject()) { |
71 V8ThrowException::throwTypeError(ExceptionMessages::failedToConstruc
t("TestInterfaceConstructor2", "parameter 1 ('dictionaryArg') is not an object."
), info.GetIsolate()); | 71 V8ThrowException::throwTypeError(ExceptionMessages::failedToConstruc
t("TestInterfaceConstructor2", "parameter 1 ('dictionaryArg') is not an object."
), info.GetIsolate()); |
72 return; | 72 return; |
73 } | 73 } |
74 } | 74 } |
75 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(d
ictionaryArg); | 75 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(d
ictionaryArg); |
76 v8::Handle<v8::Object> wrapper = info.Holder(); | 76 v8::Handle<v8::Object> wrapper = info.Holder(); |
77 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor2>(impl.r
elease(), &V8TestInterfaceConstructor2::wrapperTypeInfo, wrapper, info.GetIsolat
e()); | 77 impl.get()->associateWithWrapper(&V8TestInterfaceConstructor2::wrapperTypeIn
fo, wrapper, info.GetIsolate()); |
78 v8SetReturnValue(info, wrapper); | 78 v8SetReturnValue(info, wrapper); |
79 } | 79 } |
80 | 80 |
81 static void constructor3(const v8::FunctionCallbackInfo<v8::Value>& info) | 81 static void constructor3(const v8::FunctionCallbackInfo<v8::Value>& info) |
82 { | 82 { |
83 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor2", info.Holder(), info.GetIsolate()); | 83 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor2", info.Holder(), info.GetIsolate()); |
84 TestInterfaceEmpty* testInterfaceEmptyArg; | 84 TestInterfaceEmpty* testInterfaceEmptyArg; |
85 int longArg; | 85 int longArg; |
86 V8StringResource<> defaultUndefinedOptionalStringArg; | 86 V8StringResource<> defaultUndefinedOptionalStringArg; |
87 V8StringResource<> defaultNullStringOptionalStringArg; | 87 V8StringResource<> defaultNullStringOptionalStringArg; |
(...skipping 12 matching lines...) Expand all Loading... |
100 } | 100 } |
101 TONATIVE_VOID_INTERNAL(defaultUndefinedOptionalDictionaryArg, Dictionary
(info[4], info.GetIsolate())); | 101 TONATIVE_VOID_INTERNAL(defaultUndefinedOptionalDictionaryArg, Dictionary
(info[4], info.GetIsolate())); |
102 if (!defaultUndefinedOptionalDictionaryArg.isUndefinedOrNull() && !defau
ltUndefinedOptionalDictionaryArg.isObject()) { | 102 if (!defaultUndefinedOptionalDictionaryArg.isUndefinedOrNull() && !defau
ltUndefinedOptionalDictionaryArg.isObject()) { |
103 exceptionState.throwTypeError("parameter 5 ('defaultUndefinedOptiona
lDictionaryArg') is not an object."); | 103 exceptionState.throwTypeError("parameter 5 ('defaultUndefinedOptiona
lDictionaryArg') is not an object."); |
104 exceptionState.throwIfNeeded(); | 104 exceptionState.throwIfNeeded(); |
105 return; | 105 return; |
106 } | 106 } |
107 if (UNLIKELY(info.Length() <= 5)) { | 107 if (UNLIKELY(info.Length() <= 5)) { |
108 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::
create(testInterfaceEmptyArg, longArg, defaultUndefinedOptionalStringArg, defaul
tNullStringOptionalStringArg, defaultUndefinedOptionalDictionaryArg); | 108 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::
create(testInterfaceEmptyArg, longArg, defaultUndefinedOptionalStringArg, defaul
tNullStringOptionalStringArg, defaultUndefinedOptionalDictionaryArg); |
109 v8::Handle<v8::Object> wrapper = info.Holder(); | 109 v8::Handle<v8::Object> wrapper = info.Holder(); |
110 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor2
>(impl.release(), &V8TestInterfaceConstructor2::wrapperTypeInfo, wrapper, info.G
etIsolate()); | 110 impl.get()->associateWithWrapper(&V8TestInterfaceConstructor2::wrapp
erTypeInfo, wrapper, info.GetIsolate()); |
111 v8SetReturnValue(info, wrapper); | 111 v8SetReturnValue(info, wrapper); |
112 return; | 112 return; |
113 } | 113 } |
114 TOSTRING_VOID_INTERNAL(optionalStringArg, info[5]); | 114 TOSTRING_VOID_INTERNAL(optionalStringArg, info[5]); |
115 } | 115 } |
116 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(t
estInterfaceEmptyArg, longArg, defaultUndefinedOptionalStringArg, defaultNullStr
ingOptionalStringArg, defaultUndefinedOptionalDictionaryArg, optionalStringArg); | 116 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(t
estInterfaceEmptyArg, longArg, defaultUndefinedOptionalStringArg, defaultNullStr
ingOptionalStringArg, defaultUndefinedOptionalDictionaryArg, optionalStringArg); |
117 v8::Handle<v8::Object> wrapper = info.Holder(); | 117 v8::Handle<v8::Object> wrapper = info.Holder(); |
118 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor2>(impl.r
elease(), &V8TestInterfaceConstructor2::wrapperTypeInfo, wrapper, info.GetIsolat
e()); | 118 impl.get()->associateWithWrapper(&V8TestInterfaceConstructor2::wrapperTypeIn
fo, wrapper, info.GetIsolate()); |
119 v8SetReturnValue(info, wrapper); | 119 v8SetReturnValue(info, wrapper); |
120 } | 120 } |
121 | 121 |
122 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) | 122 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) |
123 { | 123 { |
124 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor2", info.Holder(), info.GetIsolate()); | 124 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor2", info.Holder(), info.GetIsolate()); |
125 switch (std::min(6, info.Length())) { | 125 switch (std::min(6, info.Length())) { |
126 case 1: | 126 case 1: |
127 if (info[0]->IsObject()) { | 127 if (info[0]->IsObject()) { |
128 TestInterfaceConstructor2V8Internal::constructor2(info); | 128 TestInterfaceConstructor2V8Internal::constructor2(info); |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 return 0; | 246 return 0; |
247 } | 247 } |
248 | 248 |
249 template<> | 249 template<> |
250 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor2* impl, v8::Handle<v
8::Object> creationContext, v8::Isolate* isolate) | 250 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor2* impl, v8::Handle<v
8::Object> creationContext, v8::Isolate* isolate) |
251 { | 251 { |
252 return toV8(impl, creationContext, isolate); | 252 return toV8(impl, creationContext, isolate); |
253 } | 253 } |
254 | 254 |
255 } // namespace blink | 255 } // namespace blink |
OLD | NEW |