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 "V8TestInterface2.h" | 8 #include "V8TestInterface2.h" |
9 | 9 |
10 #include "bindings/core/v8/ExceptionState.h" | 10 #include "bindings/core/v8/ExceptionState.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 const WrapperTypeInfo V8TestInterface2::wrapperTypeInfo = { gin::kEmbedderBlink,
V8TestInterface2::domTemplate, V8TestInterface2::derefObject, 0, 0, V8TestInter
face2::visitDOMWrapper, V8TestInterface2::installConditionallyEnabledMethods, 0,
WrapperTypeObjectPrototype, RefCountedObject }; | 44 const WrapperTypeInfo V8TestInterface2::wrapperTypeInfo = { gin::kEmbedderBlink,
V8TestInterface2::domTemplate, V8TestInterface2::derefObject, 0, 0, V8TestInter
face2::visitDOMWrapper, V8TestInterface2::installConditionallyEnabledMethods, 0,
WrapperTypeObjectPrototype, RefCountedObject }; |
45 | 45 |
46 namespace TestInterface2V8Internal { | 46 namespace TestInterface2V8Internal { |
47 | 47 |
48 template <typename T> void V8_USE(T) { } | 48 template <typename T> void V8_USE(T) { } |
49 | 49 |
50 static void itemMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 50 static void itemMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
51 { | 51 { |
52 ExceptionState exceptionState(ExceptionState::ExecutionContext, "item", "Tes
tInterface2", info.Holder(), info.GetIsolate()); | 52 ExceptionState exceptionState(ExceptionState::ExecutionContext, "item", "Tes
tInterface2", info.Holder(), info.GetIsolate()); |
53 if (UNLIKELY(info.Length() < 1)) { | 53 if (UNLIKELY(info.Length() < 1)) { |
54 throwMinimumArityTypeError(exceptionState, 1, info.Length()); | 54 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| 55 exceptionState.throwIfNeeded(); |
55 return; | 56 return; |
56 } | 57 } |
57 TestInterface2* impl = V8TestInterface2::toNative(info.Holder()); | 58 TestInterface2* impl = V8TestInterface2::toNative(info.Holder()); |
58 unsigned index; | 59 unsigned index; |
59 { | 60 { |
60 v8::TryCatch block; | 61 v8::TryCatch block; |
61 V8RethrowTryCatchScope rethrow(block); | 62 V8RethrowTryCatchScope rethrow(block); |
62 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(index, toUInt32(info[0], exception
State), exceptionState); | 63 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(index, toUInt32(info[0], exception
State), exceptionState); |
63 } | 64 } |
64 RefPtr<TestInterfaceEmpty> result = impl->item(index, exceptionState); | 65 RefPtr<TestInterfaceEmpty> result = impl->item(index, exceptionState); |
65 if (exceptionState.hadException()) { | 66 if (exceptionState.hadException()) { |
66 exceptionState.throwIfNeeded(); | 67 exceptionState.throwIfNeeded(); |
67 return; | 68 return; |
68 } | 69 } |
69 v8SetReturnValue(info, result.release()); | 70 v8SetReturnValue(info, result.release()); |
70 } | 71 } |
71 | 72 |
72 static void itemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) | 73 static void itemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
73 { | 74 { |
74 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 75 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
75 TestInterface2V8Internal::itemMethod(info); | 76 TestInterface2V8Internal::itemMethod(info); |
76 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 77 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
77 } | 78 } |
78 | 79 |
79 static void setItemMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 80 static void setItemMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
80 { | 81 { |
81 ExceptionState exceptionState(ExceptionState::ExecutionContext, "setItem", "
TestInterface2", info.Holder(), info.GetIsolate()); | 82 ExceptionState exceptionState(ExceptionState::ExecutionContext, "setItem", "
TestInterface2", info.Holder(), info.GetIsolate()); |
82 if (UNLIKELY(info.Length() < 2)) { | 83 if (UNLIKELY(info.Length() < 2)) { |
83 throwMinimumArityTypeError(exceptionState, 2, info.Length()); | 84 setMinimumArityTypeError(exceptionState, 2, info.Length()); |
| 85 exceptionState.throwIfNeeded(); |
84 return; | 86 return; |
85 } | 87 } |
86 TestInterface2* impl = V8TestInterface2::toNative(info.Holder()); | 88 TestInterface2* impl = V8TestInterface2::toNative(info.Holder()); |
87 unsigned index; | 89 unsigned index; |
88 V8StringResource<> value; | 90 V8StringResource<> value; |
89 { | 91 { |
90 v8::TryCatch block; | 92 v8::TryCatch block; |
91 V8RethrowTryCatchScope rethrow(block); | 93 V8RethrowTryCatchScope rethrow(block); |
92 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(index, toUInt32(info[0], exception
State), exceptionState); | 94 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(index, toUInt32(info[0], exception
State), exceptionState); |
93 TOSTRING_VOID_INTERNAL(value, info[1]); | 95 TOSTRING_VOID_INTERNAL(value, info[1]); |
(...skipping 10 matching lines...) Expand all Loading... |
104 { | 106 { |
105 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 107 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
106 TestInterface2V8Internal::setItemMethod(info); | 108 TestInterface2V8Internal::setItemMethod(info); |
107 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 109 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
108 } | 110 } |
109 | 111 |
110 static void deleteItemMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 112 static void deleteItemMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
111 { | 113 { |
112 ExceptionState exceptionState(ExceptionState::ExecutionContext, "deleteItem"
, "TestInterface2", info.Holder(), info.GetIsolate()); | 114 ExceptionState exceptionState(ExceptionState::ExecutionContext, "deleteItem"
, "TestInterface2", info.Holder(), info.GetIsolate()); |
113 if (UNLIKELY(info.Length() < 1)) { | 115 if (UNLIKELY(info.Length() < 1)) { |
114 throwMinimumArityTypeError(exceptionState, 1, info.Length()); | 116 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| 117 exceptionState.throwIfNeeded(); |
115 return; | 118 return; |
116 } | 119 } |
117 TestInterface2* impl = V8TestInterface2::toNative(info.Holder()); | 120 TestInterface2* impl = V8TestInterface2::toNative(info.Holder()); |
118 unsigned index; | 121 unsigned index; |
119 { | 122 { |
120 v8::TryCatch block; | 123 v8::TryCatch block; |
121 V8RethrowTryCatchScope rethrow(block); | 124 V8RethrowTryCatchScope rethrow(block); |
122 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(index, toUInt32(info[0], exception
State), exceptionState); | 125 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(index, toUInt32(info[0], exception
State), exceptionState); |
123 } | 126 } |
124 bool result = impl->deleteItem(index, exceptionState); | 127 bool result = impl->deleteItem(index, exceptionState); |
125 if (exceptionState.hadException()) { | 128 if (exceptionState.hadException()) { |
126 exceptionState.throwIfNeeded(); | 129 exceptionState.throwIfNeeded(); |
127 return; | 130 return; |
128 } | 131 } |
129 v8SetReturnValueBool(info, result); | 132 v8SetReturnValueBool(info, result); |
130 } | 133 } |
131 | 134 |
132 static void deleteItemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
info) | 135 static void deleteItemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
info) |
133 { | 136 { |
134 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 137 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
135 TestInterface2V8Internal::deleteItemMethod(info); | 138 TestInterface2V8Internal::deleteItemMethod(info); |
136 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 139 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
137 } | 140 } |
138 | 141 |
139 static void namedItemMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 142 static void namedItemMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
140 { | 143 { |
141 ExceptionState exceptionState(ExceptionState::ExecutionContext, "namedItem",
"TestInterface2", info.Holder(), info.GetIsolate()); | 144 ExceptionState exceptionState(ExceptionState::ExecutionContext, "namedItem",
"TestInterface2", info.Holder(), info.GetIsolate()); |
142 if (UNLIKELY(info.Length() < 1)) { | 145 if (UNLIKELY(info.Length() < 1)) { |
143 throwMinimumArityTypeError(exceptionState, 1, info.Length()); | 146 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| 147 exceptionState.throwIfNeeded(); |
144 return; | 148 return; |
145 } | 149 } |
146 TestInterface2* impl = V8TestInterface2::toNative(info.Holder()); | 150 TestInterface2* impl = V8TestInterface2::toNative(info.Holder()); |
147 V8StringResource<> name; | 151 V8StringResource<> name; |
148 { | 152 { |
149 TOSTRING_VOID_INTERNAL(name, info[0]); | 153 TOSTRING_VOID_INTERNAL(name, info[0]); |
150 } | 154 } |
151 RefPtr<TestInterfaceEmpty> result = impl->namedItem(name, exceptionState); | 155 RefPtr<TestInterfaceEmpty> result = impl->namedItem(name, exceptionState); |
152 if (exceptionState.hadException()) { | 156 if (exceptionState.hadException()) { |
153 exceptionState.throwIfNeeded(); | 157 exceptionState.throwIfNeeded(); |
154 return; | 158 return; |
155 } | 159 } |
156 v8SetReturnValue(info, result.release()); | 160 v8SetReturnValue(info, result.release()); |
157 } | 161 } |
158 | 162 |
159 static void namedItemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | 163 static void namedItemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
160 { | 164 { |
161 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 165 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
162 TestInterface2V8Internal::namedItemMethod(info); | 166 TestInterface2V8Internal::namedItemMethod(info); |
163 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 167 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
164 } | 168 } |
165 | 169 |
166 static void setNamedItemMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 170 static void setNamedItemMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
167 { | 171 { |
168 ExceptionState exceptionState(ExceptionState::ExecutionContext, "setNamedIte
m", "TestInterface2", info.Holder(), info.GetIsolate()); | 172 ExceptionState exceptionState(ExceptionState::ExecutionContext, "setNamedIte
m", "TestInterface2", info.Holder(), info.GetIsolate()); |
169 if (UNLIKELY(info.Length() < 2)) { | 173 if (UNLIKELY(info.Length() < 2)) { |
170 throwMinimumArityTypeError(exceptionState, 2, info.Length()); | 174 setMinimumArityTypeError(exceptionState, 2, info.Length()); |
| 175 exceptionState.throwIfNeeded(); |
171 return; | 176 return; |
172 } | 177 } |
173 TestInterface2* impl = V8TestInterface2::toNative(info.Holder()); | 178 TestInterface2* impl = V8TestInterface2::toNative(info.Holder()); |
174 V8StringResource<> name; | 179 V8StringResource<> name; |
175 V8StringResource<> value; | 180 V8StringResource<> value; |
176 { | 181 { |
177 TOSTRING_VOID_INTERNAL(name, info[0]); | 182 TOSTRING_VOID_INTERNAL(name, info[0]); |
178 TOSTRING_VOID_INTERNAL(value, info[1]); | 183 TOSTRING_VOID_INTERNAL(value, info[1]); |
179 } | 184 } |
180 String result = impl->setNamedItem(name, value, exceptionState); | 185 String result = impl->setNamedItem(name, value, exceptionState); |
181 if (exceptionState.hadException()) { | 186 if (exceptionState.hadException()) { |
182 exceptionState.throwIfNeeded(); | 187 exceptionState.throwIfNeeded(); |
183 return; | 188 return; |
184 } | 189 } |
185 v8SetReturnValueString(info, result, info.GetIsolate()); | 190 v8SetReturnValueString(info, result, info.GetIsolate()); |
186 } | 191 } |
187 | 192 |
188 static void setNamedItemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>
& info) | 193 static void setNamedItemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>
& info) |
189 { | 194 { |
190 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 195 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
191 TestInterface2V8Internal::setNamedItemMethod(info); | 196 TestInterface2V8Internal::setNamedItemMethod(info); |
192 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 197 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
193 } | 198 } |
194 | 199 |
195 static void deleteNamedItemMethod(const v8::FunctionCallbackInfo<v8::Value>& inf
o) | 200 static void deleteNamedItemMethod(const v8::FunctionCallbackInfo<v8::Value>& inf
o) |
196 { | 201 { |
197 ExceptionState exceptionState(ExceptionState::ExecutionContext, "deleteNamed
Item", "TestInterface2", info.Holder(), info.GetIsolate()); | 202 ExceptionState exceptionState(ExceptionState::ExecutionContext, "deleteNamed
Item", "TestInterface2", info.Holder(), info.GetIsolate()); |
198 if (UNLIKELY(info.Length() < 1)) { | 203 if (UNLIKELY(info.Length() < 1)) { |
199 throwMinimumArityTypeError(exceptionState, 1, info.Length()); | 204 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| 205 exceptionState.throwIfNeeded(); |
200 return; | 206 return; |
201 } | 207 } |
202 TestInterface2* impl = V8TestInterface2::toNative(info.Holder()); | 208 TestInterface2* impl = V8TestInterface2::toNative(info.Holder()); |
203 V8StringResource<> name; | 209 V8StringResource<> name; |
204 { | 210 { |
205 TOSTRING_VOID_INTERNAL(name, info[0]); | 211 TOSTRING_VOID_INTERNAL(name, info[0]); |
206 } | 212 } |
207 bool result = impl->deleteNamedItem(name, exceptionState); | 213 bool result = impl->deleteNamedItem(name, exceptionState); |
208 if (exceptionState.hadException()) { | 214 if (exceptionState.hadException()) { |
209 exceptionState.throwIfNeeded(); | 215 exceptionState.throwIfNeeded(); |
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
542 fromInternalPointer(internalPointer)->deref(); | 548 fromInternalPointer(internalPointer)->deref(); |
543 } | 549 } |
544 | 550 |
545 template<> | 551 template<> |
546 v8::Handle<v8::Value> toV8NoInline(TestInterface2* impl, v8::Handle<v8::Object>
creationContext, v8::Isolate* isolate) | 552 v8::Handle<v8::Value> toV8NoInline(TestInterface2* impl, v8::Handle<v8::Object>
creationContext, v8::Isolate* isolate) |
547 { | 553 { |
548 return toV8(impl, creationContext, isolate); | 554 return toV8(impl, creationContext, isolate); |
549 } | 555 } |
550 | 556 |
551 } // namespace blink | 557 } // namespace blink |
OLD | NEW |