| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 423 static void shortAttributeAttributeGetterCallback(v8::Local<v8::String>, const v
8::PropertyCallbackInfo<v8::Value>& info) | 423 static void shortAttributeAttributeGetterCallback(v8::Local<v8::String>, const v
8::PropertyCallbackInfo<v8::Value>& info) |
| 424 { | 424 { |
| 425 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 425 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 426 TestObjectPythonV8Internal::shortAttributeAttributeGetter(info); | 426 TestObjectPythonV8Internal::shortAttributeAttributeGetter(info); |
| 427 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 427 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 428 } | 428 } |
| 429 | 429 |
| 430 static void shortAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8
::PropertyCallbackInfo<void>& info) | 430 static void shortAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8
::PropertyCallbackInfo<void>& info) |
| 431 { | 431 { |
| 432 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); | 432 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); |
| 433 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); | 433 V8TRYCATCH_VOID(int, cppValue, toInt16(jsValue)); |
| 434 imp->setShortAttribute(cppValue); | 434 imp->setShortAttribute(cppValue); |
| 435 } | 435 } |
| 436 | 436 |
| 437 static void shortAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loc
al<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 437 static void shortAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loc
al<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
| 438 { | 438 { |
| 439 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 439 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 440 TestObjectPythonV8Internal::shortAttributeAttributeSetter(jsValue, info); | 440 TestObjectPythonV8Internal::shortAttributeAttributeSetter(jsValue, info); |
| 441 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 441 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 442 } | 442 } |
| 443 | 443 |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 504 static void unsignedShortAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 504 static void unsignedShortAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 505 { | 505 { |
| 506 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 506 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 507 TestObjectPythonV8Internal::unsignedShortAttributeAttributeGetter(info); | 507 TestObjectPythonV8Internal::unsignedShortAttributeAttributeGetter(info); |
| 508 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 508 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 509 } | 509 } |
| 510 | 510 |
| 511 static void unsignedShortAttributeAttributeSetter(v8::Local<v8::Value> jsValue,
const v8::PropertyCallbackInfo<void>& info) | 511 static void unsignedShortAttributeAttributeSetter(v8::Local<v8::Value> jsValue,
const v8::PropertyCallbackInfo<void>& info) |
| 512 { | 512 { |
| 513 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); | 513 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); |
| 514 V8TRYCATCH_VOID(unsigned, cppValue, toUInt32(jsValue)); | 514 V8TRYCATCH_VOID(unsigned, cppValue, toUInt16(jsValue)); |
| 515 imp->setUnsignedShortAttribute(cppValue); | 515 imp->setUnsignedShortAttribute(cppValue); |
| 516 } | 516 } |
| 517 | 517 |
| 518 static void unsignedShortAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 518 static void unsignedShortAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
| 519 { | 519 { |
| 520 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 520 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 521 TestObjectPythonV8Internal::unsignedShortAttributeAttributeSetter(jsValue, i
nfo); | 521 TestObjectPythonV8Internal::unsignedShortAttributeAttributeSetter(jsValue, i
nfo); |
| 522 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 522 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 523 } | 523 } |
| 524 | 524 |
| (...skipping 2100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2625 static void reflectUnsignedShortAttributeAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2625 static void reflectUnsignedShortAttributeAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 2626 { | 2626 { |
| 2627 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2627 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 2628 TestObjectPythonV8Internal::reflectUnsignedShortAttributeAttributeGetter(inf
o); | 2628 TestObjectPythonV8Internal::reflectUnsignedShortAttributeAttributeGetter(inf
o); |
| 2629 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 2629 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 2630 } | 2630 } |
| 2631 | 2631 |
| 2632 static void reflectUnsignedShortAttributeAttributeSetter(v8::Local<v8::Value> js
Value, const v8::PropertyCallbackInfo<void>& info) | 2632 static void reflectUnsignedShortAttributeAttributeSetter(v8::Local<v8::Value> js
Value, const v8::PropertyCallbackInfo<void>& info) |
| 2633 { | 2633 { |
| 2634 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); | 2634 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); |
| 2635 V8TRYCATCH_VOID(unsigned, cppValue, toUInt32(jsValue)); | 2635 V8TRYCATCH_VOID(unsigned, cppValue, toUInt16(jsValue)); |
| 2636 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 2636 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
| 2637 imp->setAttribute(HTMLNames::reflectunsignedshortattributeAttr, cppValue); | 2637 imp->setAttribute(HTMLNames::reflectunsignedshortattributeAttr, cppValue); |
| 2638 } | 2638 } |
| 2639 | 2639 |
| 2640 static void reflectUnsignedShortAttributeAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info
) | 2640 static void reflectUnsignedShortAttributeAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info
) |
| 2641 { | 2641 { |
| 2642 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2642 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 2643 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 2643 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
| 2644 TestObjectPythonV8Internal::reflectUnsignedShortAttributeAttributeSetter(jsV
alue, info); | 2644 TestObjectPythonV8Internal::reflectUnsignedShortAttributeAttributeSetter(jsV
alue, info); |
| 2645 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 2645 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| (...skipping 937 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3583 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 3583 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 3584 } | 3584 } |
| 3585 | 3585 |
| 3586 static void voidMethodShortArgMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) | 3586 static void voidMethodShortArgMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 3587 { | 3587 { |
| 3588 if (UNLIKELY(info.Length() < 1)) { | 3588 if (UNLIKELY(info.Length() < 1)) { |
| 3589 throwTypeError(ExceptionMessages::failedToExecute("voidMethodShortArg",
"TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), in
fo.GetIsolate()); | 3589 throwTypeError(ExceptionMessages::failedToExecute("voidMethodShortArg",
"TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), in
fo.GetIsolate()); |
| 3590 return; | 3590 return; |
| 3591 } | 3591 } |
| 3592 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); | 3592 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); |
| 3593 V8TRYCATCH_VOID(int, shortArg, toInt32(info[0])); | 3593 V8TRYCATCH_VOID(int, shortArg, toInt16(info[0])); |
| 3594 imp->voidMethodShortArg(shortArg); | 3594 imp->voidMethodShortArg(shortArg); |
| 3595 } | 3595 } |
| 3596 | 3596 |
| 3597 static void voidMethodShortArgMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) | 3597 static void voidMethodShortArgMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) |
| 3598 { | 3598 { |
| 3599 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3599 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 3600 TestObjectPythonV8Internal::voidMethodShortArgMethod(info); | 3600 TestObjectPythonV8Internal::voidMethodShortArgMethod(info); |
| 3601 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 3601 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 3602 } | 3602 } |
| 3603 | 3603 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3637 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 3637 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 3638 } | 3638 } |
| 3639 | 3639 |
| 3640 static void voidMethodUnsignedShortArgMethod(const v8::FunctionCallbackInfo<v8::
Value>& info) | 3640 static void voidMethodUnsignedShortArgMethod(const v8::FunctionCallbackInfo<v8::
Value>& info) |
| 3641 { | 3641 { |
| 3642 if (UNLIKELY(info.Length() < 1)) { | 3642 if (UNLIKELY(info.Length() < 1)) { |
| 3643 throwTypeError(ExceptionMessages::failedToExecute("voidMethodUnsignedSho
rtArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length
())), info.GetIsolate()); | 3643 throwTypeError(ExceptionMessages::failedToExecute("voidMethodUnsignedSho
rtArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length
())), info.GetIsolate()); |
| 3644 return; | 3644 return; |
| 3645 } | 3645 } |
| 3646 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); | 3646 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); |
| 3647 V8TRYCATCH_VOID(unsigned, unsignedShortArg, toUInt32(info[0])); | 3647 V8TRYCATCH_VOID(unsigned, unsignedShortArg, toUInt16(info[0])); |
| 3648 imp->voidMethodUnsignedShortArg(unsignedShortArg); | 3648 imp->voidMethodUnsignedShortArg(unsignedShortArg); |
| 3649 } | 3649 } |
| 3650 | 3650 |
| 3651 static void voidMethodUnsignedShortArgMethodCallback(const v8::FunctionCallbackI
nfo<v8::Value>& info) | 3651 static void voidMethodUnsignedShortArgMethodCallback(const v8::FunctionCallbackI
nfo<v8::Value>& info) |
| 3652 { | 3652 { |
| 3653 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 3653 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 3654 TestObjectPythonV8Internal::voidMethodUnsignedShortArgMethod(info); | 3654 TestObjectPythonV8Internal::voidMethodUnsignedShortArgMethod(info); |
| 3655 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 3655 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 3656 } | 3656 } |
| 3657 | 3657 |
| (...skipping 1664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5322 V8DOMWrapper::associateObjectWithWrapper<V8TestObjectPython>(impl, &wrapperT
ypeInfo, wrapper, isolate, WrapperConfiguration::Independent); | 5322 V8DOMWrapper::associateObjectWithWrapper<V8TestObjectPython>(impl, &wrapperT
ypeInfo, wrapper, isolate, WrapperConfiguration::Independent); |
| 5323 return wrapper; | 5323 return wrapper; |
| 5324 } | 5324 } |
| 5325 | 5325 |
| 5326 void V8TestObjectPython::derefObject(void* object) | 5326 void V8TestObjectPython::derefObject(void* object) |
| 5327 { | 5327 { |
| 5328 fromInternalPointer(object)->deref(); | 5328 fromInternalPointer(object)->deref(); |
| 5329 } | 5329 } |
| 5330 | 5330 |
| 5331 } // namespace WebCore | 5331 } // namespace WebCore |
| OLD | NEW |