| 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 #if ENABLE(CONDITION) | 8 #if ENABLE(CONDITION) |
| 9 #include "V8TestInterface5.h" | 9 #include "V8TestInterface5.h" |
| 10 | 10 |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 82 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 83 TestInterface5ImplementationV8Internal::doubleAttributeAttributeGetter(info)
; | 83 TestInterface5ImplementationV8Internal::doubleAttributeAttributeGetter(info)
; |
| 84 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 84 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 85 } | 85 } |
| 86 | 86 |
| 87 static void doubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::PropertyCallbackInfo<void>& info) | 87 static void doubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::PropertyCallbackInfo<void>& info) |
| 88 { | 88 { |
| 89 v8::Local<v8::Object> holder = info.Holder(); | 89 v8::Local<v8::Object> holder = info.Holder(); |
| 90 ExceptionState exceptionState(ExceptionState::SetterContext, "doubleAttribut
e", "TestInterface5", holder, info.GetIsolate()); | 90 ExceptionState exceptionState(ExceptionState::SetterContext, "doubleAttribut
e", "TestInterface5", holder, info.GetIsolate()); |
| 91 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 91 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 92 TONATIVE_VOID_EXCEPTIONSTATE(double, cppValue, toDouble(v8Value, exceptionSt
ate), exceptionState); | 92 TONATIVE_VOID_EXCEPTIONSTATE(double, cppValue, toRestrictedDouble(v8Value, e
xceptionState), exceptionState); |
| 93 if (!std::isfinite(cppValue)) { | |
| 94 exceptionState.throwTypeError("The provided double value is non-finite."
); | |
| 95 exceptionState.throwIfNeeded(); | |
| 96 return; | |
| 97 } | |
| 98 impl->setDoubleAttribute(cppValue); | 93 impl->setDoubleAttribute(cppValue); |
| 99 } | 94 } |
| 100 | 95 |
| 101 static void doubleAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 96 static void doubleAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 102 { | 97 { |
| 103 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 98 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 104 TestInterface5ImplementationV8Internal::doubleAttributeAttributeSetter(v8Val
ue, info); | 99 TestInterface5ImplementationV8Internal::doubleAttributeAttributeSetter(v8Val
ue, info); |
| 105 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 100 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 106 } | 101 } |
| 107 | 102 |
| 108 static void floatAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Val
ue>& info) | 103 static void floatAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Val
ue>& info) |
| 109 { | 104 { |
| 110 v8::Local<v8::Object> holder = info.Holder(); | 105 v8::Local<v8::Object> holder = info.Holder(); |
| 111 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 106 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 112 v8SetReturnValue(info, impl->floatAttribute()); | 107 v8SetReturnValue(info, impl->floatAttribute()); |
| 113 } | 108 } |
| 114 | 109 |
| 115 static void floatAttributeAttributeGetterCallback(v8::Local<v8::String>, const v
8::PropertyCallbackInfo<v8::Value>& info) | 110 static void floatAttributeAttributeGetterCallback(v8::Local<v8::String>, const v
8::PropertyCallbackInfo<v8::Value>& info) |
| 116 { | 111 { |
| 117 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 112 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 118 TestInterface5ImplementationV8Internal::floatAttributeAttributeGetter(info); | 113 TestInterface5ImplementationV8Internal::floatAttributeAttributeGetter(info); |
| 119 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 114 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 120 } | 115 } |
| 121 | 116 |
| 122 static void floatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::PropertyCallbackInfo<void>& info) | 117 static void floatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::PropertyCallbackInfo<void>& info) |
| 123 { | 118 { |
| 124 v8::Local<v8::Object> holder = info.Holder(); | 119 v8::Local<v8::Object> holder = info.Holder(); |
| 125 ExceptionState exceptionState(ExceptionState::SetterContext, "floatAttribute
", "TestInterface5", holder, info.GetIsolate()); | 120 ExceptionState exceptionState(ExceptionState::SetterContext, "floatAttribute
", "TestInterface5", holder, info.GetIsolate()); |
| 126 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 121 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 127 TONATIVE_VOID_EXCEPTIONSTATE(float, cppValue, toFloat(v8Value, exceptionStat
e), exceptionState); | 122 TONATIVE_VOID_EXCEPTIONSTATE(float, cppValue, toRestrictedFloat(v8Value, exc
eptionState), exceptionState); |
| 128 if (!std::isfinite(cppValue)) { | |
| 129 exceptionState.throwTypeError("The provided float value is non-finite.")
; | |
| 130 exceptionState.throwIfNeeded(); | |
| 131 return; | |
| 132 } | |
| 133 impl->setFloatAttribute(cppValue); | 123 impl->setFloatAttribute(cppValue); |
| 134 } | 124 } |
| 135 | 125 |
| 136 static void floatAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loc
al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 126 static void floatAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loc
al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 137 { | 127 { |
| 138 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 128 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 139 TestInterface5ImplementationV8Internal::floatAttributeAttributeSetter(v8Valu
e, info); | 129 TestInterface5ImplementationV8Internal::floatAttributeAttributeSetter(v8Valu
e, info); |
| 140 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 130 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 141 } | 131 } |
| 142 | 132 |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
oubleArgFloatArg", "TestInterface5", info.Holder(), info.GetIsolate()); | 356 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
oubleArgFloatArg", "TestInterface5", info.Holder(), info.GetIsolate()); |
| 367 if (UNLIKELY(info.Length() < 2)) { | 357 if (UNLIKELY(info.Length() < 2)) { |
| 368 setMinimumArityTypeError(exceptionState, 2, info.Length()); | 358 setMinimumArityTypeError(exceptionState, 2, info.Length()); |
| 369 exceptionState.throwIfNeeded(); | 359 exceptionState.throwIfNeeded(); |
| 370 return; | 360 return; |
| 371 } | 361 } |
| 372 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 362 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
| 373 double doubleArg; | 363 double doubleArg; |
| 374 float floatArg; | 364 float floatArg; |
| 375 { | 365 { |
| 376 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(doubleArg, toDouble(info[0], excep
tionState), exceptionState); | 366 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(doubleArg, toRestrictedDouble(info
[0], exceptionState), exceptionState); |
| 377 if (!std::isfinite(doubleArg)) { | 367 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(floatArg, toRestrictedFloat(info[1
], exceptionState), exceptionState); |
| 378 exceptionState.throwTypeError("double parameter 1 is non-finite."); | |
| 379 exceptionState.throwIfNeeded(); | |
| 380 return; | |
| 381 } | |
| 382 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(floatArg, toFloat(info[1], excepti
onState), exceptionState); | |
| 383 if (!std::isfinite(floatArg)) { | |
| 384 exceptionState.throwTypeError("float parameter 2 is non-finite."); | |
| 385 exceptionState.throwIfNeeded(); | |
| 386 return; | |
| 387 } | |
| 388 } | 368 } |
| 389 impl->voidMethodDoubleArgFloatArg(doubleArg, floatArg); | 369 impl->voidMethodDoubleArgFloatArg(doubleArg, floatArg); |
| 390 } | 370 } |
| 391 | 371 |
| 392 static void voidMethodDoubleArgFloatArgMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) | 372 static void voidMethodDoubleArgFloatArgMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) |
| 393 { | 373 { |
| 394 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 374 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 395 TestInterface5ImplementationV8Internal::voidMethodDoubleArgFloatArgMethod(in
fo); | 375 TestInterface5ImplementationV8Internal::voidMethodDoubleArgFloatArgMethod(in
fo); |
| 396 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 376 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 397 } | 377 } |
| (...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 990 scriptWrappable->toImpl<TestInterface5Implementation>()->ref(); | 970 scriptWrappable->toImpl<TestInterface5Implementation>()->ref(); |
| 991 } | 971 } |
| 992 | 972 |
| 993 void V8TestInterface5::derefObject(ScriptWrappable* scriptWrappable) | 973 void V8TestInterface5::derefObject(ScriptWrappable* scriptWrappable) |
| 994 { | 974 { |
| 995 scriptWrappable->toImpl<TestInterface5Implementation>()->deref(); | 975 scriptWrappable->toImpl<TestInterface5Implementation>()->deref(); |
| 996 } | 976 } |
| 997 | 977 |
| 998 } // namespace blink | 978 } // namespace blink |
| 999 #endif // ENABLE(CONDITION) | 979 #endif // ENABLE(CONDITION) |
| OLD | NEW |