| 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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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->has(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->stringifierMethod(), 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); |
| (...skipping 239 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 |