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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 229 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
230 TestInterface2V8Internal::stringifierMethodMethod(info); | 230 TestInterface2V8Internal::stringifierMethodMethod(info); |
231 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 231 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
232 } | 232 } |
233 | 233 |
234 static void keysMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 234 static void keysMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
235 { | 235 { |
236 ExceptionState exceptionState(ExceptionState::ExecutionContext, "keys", "Tes
tInterface2", info.Holder(), info.GetIsolate()); | 236 ExceptionState exceptionState(ExceptionState::ExecutionContext, "keys", "Tes
tInterface2", info.Holder(), info.GetIsolate()); |
237 TestInterface2* impl = V8TestInterface2::toImpl(info.Holder()); | 237 TestInterface2* impl = V8TestInterface2::toImpl(info.Holder()); |
238 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 238 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
239 RawPtr<Iterator> result = impl->keys(scriptState, exceptionState); | 239 RawPtr<Iterator> result = impl->keysForBinding(scriptState, exceptionState); |
240 if (exceptionState.hadException()) { | 240 if (exceptionState.hadException()) { |
241 exceptionState.throwIfNeeded(); | 241 exceptionState.throwIfNeeded(); |
242 return; | 242 return; |
243 } | 243 } |
244 v8SetReturnValue(info, result.release()); | 244 v8SetReturnValue(info, result.release()); |
245 } | 245 } |
246 | 246 |
247 static void keysMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) | 247 static void keysMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
248 { | 248 { |
249 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 249 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
250 TestInterface2V8Internal::keysMethod(info); | 250 TestInterface2V8Internal::keysMethod(info); |
251 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 251 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
252 } | 252 } |
253 | 253 |
254 static void valuesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 254 static void valuesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
255 { | 255 { |
256 ExceptionState exceptionState(ExceptionState::ExecutionContext, "values", "T
estInterface2", info.Holder(), info.GetIsolate()); | 256 ExceptionState exceptionState(ExceptionState::ExecutionContext, "values", "T
estInterface2", info.Holder(), info.GetIsolate()); |
257 TestInterface2* impl = V8TestInterface2::toImpl(info.Holder()); | 257 TestInterface2* impl = V8TestInterface2::toImpl(info.Holder()); |
258 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 258 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
259 RawPtr<Iterator> result = impl->values(scriptState, exceptionState); | 259 RawPtr<Iterator> result = impl->valuesForBinding(scriptState, exceptionState
); |
260 if (exceptionState.hadException()) { | 260 if (exceptionState.hadException()) { |
261 exceptionState.throwIfNeeded(); | 261 exceptionState.throwIfNeeded(); |
262 return; | 262 return; |
263 } | 263 } |
264 v8SetReturnValue(info, result.release()); | 264 v8SetReturnValue(info, result.release()); |
265 } | 265 } |
266 | 266 |
267 static void valuesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info
) | 267 static void valuesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info
) |
268 { | 268 { |
269 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 269 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
270 TestInterface2V8Internal::valuesMethod(info); | 270 TestInterface2V8Internal::valuesMethod(info); |
271 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 271 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
272 } | 272 } |
273 | 273 |
274 static void entriesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 274 static void entriesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
275 { | 275 { |
276 ExceptionState exceptionState(ExceptionState::ExecutionContext, "entries", "
TestInterface2", info.Holder(), info.GetIsolate()); | 276 ExceptionState exceptionState(ExceptionState::ExecutionContext, "entries", "
TestInterface2", info.Holder(), info.GetIsolate()); |
277 TestInterface2* impl = V8TestInterface2::toImpl(info.Holder()); | 277 TestInterface2* impl = V8TestInterface2::toImpl(info.Holder()); |
278 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 278 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
279 RawPtr<Iterator> result = impl->entries(scriptState, exceptionState); | 279 RawPtr<Iterator> result = impl->entriesForBinding(scriptState, exceptionStat
e); |
280 if (exceptionState.hadException()) { | 280 if (exceptionState.hadException()) { |
281 exceptionState.throwIfNeeded(); | 281 exceptionState.throwIfNeeded(); |
282 return; | 282 return; |
283 } | 283 } |
284 v8SetReturnValue(info, result.release()); | 284 v8SetReturnValue(info, result.release()); |
285 } | 285 } |
286 | 286 |
287 static void entriesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf
o) | 287 static void entriesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf
o) |
288 { | 288 { |
289 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 289 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
(...skipping 15 matching lines...) Expand all Loading... |
305 { | 305 { |
306 if (!info[0]->IsFunction()) { | 306 if (!info[0]->IsFunction()) { |
307 exceptionState.throwTypeError("The callback provided as parameter 1
is not a function."); | 307 exceptionState.throwTypeError("The callback provided as parameter 1
is not a function."); |
308 exceptionState.throwIfNeeded(); | 308 exceptionState.throwIfNeeded(); |
309 return; | 309 return; |
310 } | 310 } |
311 callback = ScriptValue(ScriptState::current(info.GetIsolate()), info[0])
; | 311 callback = ScriptValue(ScriptState::current(info.GetIsolate()), info[0])
; |
312 thisArg = ScriptValue(ScriptState::current(info.GetIsolate()), info[1]); | 312 thisArg = ScriptValue(ScriptState::current(info.GetIsolate()), info[1]); |
313 } | 313 } |
314 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 314 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
315 impl->forEach(scriptState, ScriptValue(scriptState, info.This()), callback,
thisArg, exceptionState); | 315 impl->forEachForBinding(scriptState, ScriptValue(scriptState, info.This()),
callback, thisArg, exceptionState); |
316 if (exceptionState.hadException()) { | 316 if (exceptionState.hadException()) { |
317 exceptionState.throwIfNeeded(); | 317 exceptionState.throwIfNeeded(); |
318 return; | 318 return; |
319 } | 319 } |
320 } | 320 } |
321 | 321 |
322 static void forEachMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf
o) | 322 static void forEachMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf
o) |
323 { | 323 { |
324 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 324 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
325 TestInterface2V8Internal::forEachMethod(info); | 325 TestInterface2V8Internal::forEachMethod(info); |
326 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 326 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
327 } | 327 } |
328 | 328 |
| 329 static void hasMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 330 { |
| 331 ExceptionState exceptionState(ExceptionState::ExecutionContext, "has", "Test
Interface2", info.Holder(), info.GetIsolate()); |
| 332 if (UNLIKELY(info.Length() < 1)) { |
| 333 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| 334 exceptionState.throwIfNeeded(); |
| 335 return; |
| 336 } |
| 337 TestInterface2* impl = V8TestInterface2::toImpl(info.Holder()); |
| 338 TestInterfaceEmpty* value; |
| 339 { |
| 340 value = V8TestInterfaceEmpty::toImplWithTypeCheck(info.GetIsolate(), inf
o[0]); |
| 341 } |
| 342 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| 343 bool result = impl->hasForBinding(scriptState, value, exceptionState); |
| 344 if (exceptionState.hadException()) { |
| 345 exceptionState.throwIfNeeded(); |
| 346 return; |
| 347 } |
| 348 v8SetReturnValueBool(info, result); |
| 349 } |
| 350 |
| 351 static void hasMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 352 { |
| 353 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 354 TestInterface2V8Internal::hasMethod(info); |
| 355 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 356 } |
| 357 |
329 static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 358 static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
330 { | 359 { |
331 TestInterface2* impl = V8TestInterface2::toImpl(info.Holder()); | 360 TestInterface2* impl = V8TestInterface2::toImpl(info.Holder()); |
332 v8SetReturnValueString(info, impl->stringifierMethod(), info.GetIsolate()); | 361 v8SetReturnValueString(info, impl->toString(), info.GetIsolate()); |
333 } | 362 } |
334 | 363 |
335 static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in
fo) | 364 static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in
fo) |
336 { | 365 { |
337 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 366 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
338 TestInterface2V8Internal::toStringMethod(info); | 367 TestInterface2V8Internal::toStringMethod(info); |
339 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 368 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
340 } | 369 } |
341 | 370 |
342 static void iteratorMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 371 static void iteratorMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
578 {"setItem", TestInterface2V8Internal::setItemMethodCallback, 0, 2, V8DOMConf
iguration::ExposedToAllScripts}, | 607 {"setItem", TestInterface2V8Internal::setItemMethodCallback, 0, 2, V8DOMConf
iguration::ExposedToAllScripts}, |
579 {"deleteItem", TestInterface2V8Internal::deleteItemMethodCallback, 0, 1, V8D
OMConfiguration::ExposedToAllScripts}, | 608 {"deleteItem", TestInterface2V8Internal::deleteItemMethodCallback, 0, 1, V8D
OMConfiguration::ExposedToAllScripts}, |
580 {"namedItem", TestInterface2V8Internal::namedItemMethodCallback, 0, 1, V8DOM
Configuration::ExposedToAllScripts}, | 609 {"namedItem", TestInterface2V8Internal::namedItemMethodCallback, 0, 1, V8DOM
Configuration::ExposedToAllScripts}, |
581 {"setNamedItem", TestInterface2V8Internal::setNamedItemMethodCallback, 0, 2,
V8DOMConfiguration::ExposedToAllScripts}, | 610 {"setNamedItem", TestInterface2V8Internal::setNamedItemMethodCallback, 0, 2,
V8DOMConfiguration::ExposedToAllScripts}, |
582 {"deleteNamedItem", TestInterface2V8Internal::deleteNamedItemMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, | 611 {"deleteNamedItem", TestInterface2V8Internal::deleteNamedItemMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, |
583 {"stringifierMethod", TestInterface2V8Internal::stringifierMethodMethodCallb
ack, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | 612 {"stringifierMethod", TestInterface2V8Internal::stringifierMethodMethodCallb
ack, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, |
584 {"keys", TestInterface2V8Internal::keysMethodCallback, 0, 0, V8DOMConfigurat
ion::ExposedToAllScripts}, | 613 {"keys", TestInterface2V8Internal::keysMethodCallback, 0, 0, V8DOMConfigurat
ion::ExposedToAllScripts}, |
585 {"values", TestInterface2V8Internal::valuesMethodCallback, 0, 0, V8DOMConfig
uration::ExposedToAllScripts}, | 614 {"values", TestInterface2V8Internal::valuesMethodCallback, 0, 0, V8DOMConfig
uration::ExposedToAllScripts}, |
586 {"entries", TestInterface2V8Internal::entriesMethodCallback, 0, 0, V8DOMConf
iguration::ExposedToAllScripts}, | 615 {"entries", TestInterface2V8Internal::entriesMethodCallback, 0, 0, V8DOMConf
iguration::ExposedToAllScripts}, |
587 {"forEach", TestInterface2V8Internal::forEachMethodCallback, 0, 1, V8DOMConf
iguration::ExposedToAllScripts}, | 616 {"forEach", TestInterface2V8Internal::forEachMethodCallback, 0, 1, V8DOMConf
iguration::ExposedToAllScripts}, |
| 617 {"has", TestInterface2V8Internal::hasMethodCallback, 0, 1, V8DOMConfiguratio
n::ExposedToAllScripts}, |
588 {"toString", TestInterface2V8Internal::toStringMethodCallback, 0, 0, V8DOMCo
nfiguration::ExposedToAllScripts}, | 618 {"toString", TestInterface2V8Internal::toStringMethodCallback, 0, 0, V8DOMCo
nfiguration::ExposedToAllScripts}, |
589 }; | 619 }; |
590 | 620 |
591 void V8TestInterface2::constructorCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | 621 void V8TestInterface2::constructorCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& info) |
592 { | 622 { |
593 TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "DOMConstructor"); | 623 TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "DOMConstructor"); |
594 if (!info.IsConstructCall()) { | 624 if (!info.IsConstructCall()) { |
595 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::c
onstructorNotCallableAsFunction("TestInterface2")); | 625 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::c
onstructorNotCallableAsFunction("TestInterface2")); |
596 return; | 626 return; |
597 } | 627 } |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
657 { | 687 { |
658 scriptWrappable->toImpl<TestInterface2>()->ref(); | 688 scriptWrappable->toImpl<TestInterface2>()->ref(); |
659 } | 689 } |
660 | 690 |
661 void V8TestInterface2::derefObject(ScriptWrappable* scriptWrappable) | 691 void V8TestInterface2::derefObject(ScriptWrappable* scriptWrappable) |
662 { | 692 { |
663 scriptWrappable->toImpl<TestInterface2>()->deref(); | 693 scriptWrappable->toImpl<TestInterface2>()->deref(); |
664 } | 694 } |
665 | 695 |
666 } // namespace blink | 696 } // namespace blink |
OLD | NEW |