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 "V8TestInterfaceGarbageCollected.h" | 8 #include "V8TestInterfaceGarbageCollected.h" |
9 | 9 |
10 #include "bindings/core/v8/ExceptionState.h" | 10 #include "bindings/core/v8/ExceptionState.h" |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 151 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
152 exceptionState.throwIfNeeded(); | 152 exceptionState.throwIfNeeded(); |
153 return; | 153 return; |
154 } | 154 } |
155 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toImp
l(info.Holder()); | 155 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toImp
l(info.Holder()); |
156 ScriptValue callback; | 156 ScriptValue callback; |
157 ScriptValue thisArg; | 157 ScriptValue thisArg; |
158 { | 158 { |
159 if (!info[0]->IsFunction()) { | 159 if (!info[0]->IsFunction()) { |
160 exceptionState.throwTypeError("The callback provided as parameter 1
is not a function."); | 160 exceptionState.throwTypeError("The callback provided as parameter 1
is not a function."); |
161 exceptionState.throwIfNeeded(); | 161 exceptionState.throwIfNeeded(); |
162 return; | 162 return; |
163 } | 163 } |
164 callback = ScriptValue(ScriptState::current(info.GetIsolate()), info[0])
; | 164 callback = ScriptValue(ScriptState::current(info.GetIsolate()), info[0])
; |
165 thisArg = ScriptValue(ScriptState::current(info.GetIsolate()), info[1]); | 165 thisArg = ScriptValue(ScriptState::current(info.GetIsolate()), info[1]); |
166 } | 166 } |
167 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 167 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
168 impl->forEachForBinding(scriptState, ScriptValue(scriptState, info.This()),
callback, thisArg, exceptionState); | 168 impl->forEachForBinding(scriptState, ScriptValue(scriptState, info.This()),
callback, thisArg, exceptionState); |
169 if (exceptionState.hadException()) { | 169 if (exceptionState.hadException()) { |
170 exceptionState.throwIfNeeded(); | 170 exceptionState.throwIfNeeded(); |
171 return; | 171 return; |
(...skipping 11 matching lines...) Expand all Loading... |
183 { | 183 { |
184 ExceptionState exceptionState(ExceptionState::ExecutionContext, "has", "Test
InterfaceGarbageCollected", info.Holder(), info.GetIsolate()); | 184 ExceptionState exceptionState(ExceptionState::ExecutionContext, "has", "Test
InterfaceGarbageCollected", info.Holder(), info.GetIsolate()); |
185 if (UNLIKELY(info.Length() < 1)) { | 185 if (UNLIKELY(info.Length() < 1)) { |
186 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 186 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
187 exceptionState.throwIfNeeded(); | 187 exceptionState.throwIfNeeded(); |
188 return; | 188 return; |
189 } | 189 } |
190 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toImp
l(info.Holder()); | 190 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toImp
l(info.Holder()); |
191 V8StringResource<> value; | 191 V8StringResource<> value; |
192 { | 192 { |
193 TOSTRING_VOID_INTERNAL(value, info[0]); | 193 value = info[0]; |
| 194 if (!value.prepare()) |
| 195 return; |
194 } | 196 } |
195 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 197 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
196 bool result = impl->hasForBinding(scriptState, value, exceptionState); | 198 bool result = impl->hasForBinding(scriptState, value, exceptionState); |
197 if (exceptionState.hadException()) { | 199 if (exceptionState.hadException()) { |
198 exceptionState.throwIfNeeded(); | 200 exceptionState.throwIfNeeded(); |
199 return; | 201 return; |
200 } | 202 } |
201 v8SetReturnValueBool(info, result); | 203 v8SetReturnValueBool(info, result); |
202 } | 204 } |
203 | 205 |
204 static void hasMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) | 206 static void hasMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
205 { | 207 { |
206 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 208 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
207 TestInterfaceGarbageCollectedV8Internal::hasMethod(info); | 209 TestInterfaceGarbageCollectedV8Internal::hasMethod(info); |
208 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 210 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
209 } | 211 } |
210 | 212 |
211 static void addMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 213 static void addMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
212 { | 214 { |
213 ExceptionState exceptionState(ExceptionState::ExecutionContext, "add", "Test
InterfaceGarbageCollected", info.Holder(), info.GetIsolate()); | 215 ExceptionState exceptionState(ExceptionState::ExecutionContext, "add", "Test
InterfaceGarbageCollected", info.Holder(), info.GetIsolate()); |
214 if (UNLIKELY(info.Length() < 1)) { | 216 if (UNLIKELY(info.Length() < 1)) { |
215 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 217 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
216 exceptionState.throwIfNeeded(); | 218 exceptionState.throwIfNeeded(); |
217 return; | 219 return; |
218 } | 220 } |
219 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toImp
l(info.Holder()); | 221 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toImp
l(info.Holder()); |
220 V8StringResource<> value; | 222 V8StringResource<> value; |
221 { | 223 { |
222 TOSTRING_VOID_INTERNAL(value, info[0]); | 224 value = info[0]; |
| 225 if (!value.prepare()) |
| 226 return; |
223 } | 227 } |
224 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 228 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
225 RawPtr<TestInterfaceGarbageCollected> result = impl->addForBinding(scriptSta
te, value, exceptionState); | 229 RawPtr<TestInterfaceGarbageCollected> result = impl->addForBinding(scriptSta
te, value, exceptionState); |
226 if (exceptionState.hadException()) { | 230 if (exceptionState.hadException()) { |
227 exceptionState.throwIfNeeded(); | 231 exceptionState.throwIfNeeded(); |
228 return; | 232 return; |
229 } | 233 } |
230 v8SetReturnValue(info, result.release()); | 234 v8SetReturnValue(info, result.release()); |
231 } | 235 } |
232 | 236 |
(...skipping 27 matching lines...) Expand all Loading... |
260 { | 264 { |
261 ExceptionState exceptionState(ExceptionState::ExecutionContext, "delete", "T
estInterfaceGarbageCollected", info.Holder(), info.GetIsolate()); | 265 ExceptionState exceptionState(ExceptionState::ExecutionContext, "delete", "T
estInterfaceGarbageCollected", info.Holder(), info.GetIsolate()); |
262 if (UNLIKELY(info.Length() < 1)) { | 266 if (UNLIKELY(info.Length() < 1)) { |
263 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 267 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
264 exceptionState.throwIfNeeded(); | 268 exceptionState.throwIfNeeded(); |
265 return; | 269 return; |
266 } | 270 } |
267 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toImp
l(info.Holder()); | 271 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toImp
l(info.Holder()); |
268 V8StringResource<> value; | 272 V8StringResource<> value; |
269 { | 273 { |
270 TOSTRING_VOID_INTERNAL(value, info[0]); | 274 value = info[0]; |
| 275 if (!value.prepare()) |
| 276 return; |
271 } | 277 } |
272 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 278 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
273 bool result = impl->deleteForBinding(scriptState, value, exceptionState); | 279 bool result = impl->deleteForBinding(scriptState, value, exceptionState); |
274 if (exceptionState.hadException()) { | 280 if (exceptionState.hadException()) { |
275 exceptionState.throwIfNeeded(); | 281 exceptionState.throwIfNeeded(); |
276 return; | 282 return; |
277 } | 283 } |
278 v8SetReturnValueBool(info, result); | 284 v8SetReturnValueBool(info, result); |
279 } | 285 } |
280 | 286 |
(...skipping 25 matching lines...) Expand all Loading... |
306 } | 312 } |
307 | 313 |
308 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) | 314 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) |
309 { | 315 { |
310 if (UNLIKELY(info.Length() < 1)) { | 316 if (UNLIKELY(info.Length() < 1)) { |
311 V8ThrowException::throwException(createMinimumArityTypeErrorForConstruct
or(info.GetIsolate(), "TestInterfaceGarbageCollected", 1, info.Length()), info.G
etIsolate()); | 317 V8ThrowException::throwException(createMinimumArityTypeErrorForConstruct
or(info.GetIsolate(), "TestInterfaceGarbageCollected", 1, info.Length()), info.G
etIsolate()); |
312 return; | 318 return; |
313 } | 319 } |
314 V8StringResource<> str; | 320 V8StringResource<> str; |
315 { | 321 { |
316 TOSTRING_VOID_INTERNAL(str, info[0]); | 322 str = info[0]; |
| 323 if (!str.prepare()) |
| 324 return; |
317 } | 325 } |
318 RawPtr<TestInterfaceGarbageCollected> impl = TestInterfaceGarbageCollected::
create(str); | 326 RawPtr<TestInterfaceGarbageCollected> impl = TestInterfaceGarbageCollected::
create(str); |
319 v8::Local<v8::Object> wrapper = info.Holder(); | 327 v8::Local<v8::Object> wrapper = info.Holder(); |
320 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceGarbageCollect
ed::wrapperTypeInfo, wrapper); | 328 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceGarbageCollect
ed::wrapperTypeInfo, wrapper); |
321 v8SetReturnValue(info, wrapper); | 329 v8SetReturnValue(info, wrapper); |
322 } | 330 } |
323 | 331 |
324 } // namespace TestInterfaceGarbageCollectedV8Internal | 332 } // namespace TestInterfaceGarbageCollectedV8Internal |
325 | 333 |
326 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceGarbageCo
llectedAttributes[] = { | 334 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceGarbageCo
llectedAttributes[] = { |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 | 407 |
400 void V8TestInterfaceGarbageCollected::refObject(ScriptWrappable* scriptWrappable
) | 408 void V8TestInterfaceGarbageCollected::refObject(ScriptWrappable* scriptWrappable
) |
401 { | 409 { |
402 } | 410 } |
403 | 411 |
404 void V8TestInterfaceGarbageCollected::derefObject(ScriptWrappable* scriptWrappab
le) | 412 void V8TestInterfaceGarbageCollected::derefObject(ScriptWrappable* scriptWrappab
le) |
405 { | 413 { |
406 } | 414 } |
407 | 415 |
408 } // namespace blink | 416 } // namespace blink |
OLD | NEW |