| 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 // clang-format off | 7 // clang-format off |
| 8 #include "V8TestInterface5.h" | 8 #include "V8TestInterface5.h" |
| 9 | 9 |
| 10 #include "bindings/core/v8/ExceptionState.h" | 10 #include "bindings/core/v8/ExceptionState.h" |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 | 107 |
| 108 static void doubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::FunctionCallbackInfo<v8::Value>& info) { | 108 static void doubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::FunctionCallbackInfo<v8::Value>& info) { |
| 109 v8::Local<v8::Object> holder = info.Holder(); | 109 v8::Local<v8::Object> holder = info.Holder(); |
| 110 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 110 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 111 | 111 |
| 112 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext
, "TestInterface5", "doubleAttribute"); | 112 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext
, "TestInterface5", "doubleAttribute"); |
| 113 | 113 |
| 114 // Prepare the value to be set. | 114 // Prepare the value to be set. |
| 115 double cppValue = toRestrictedDouble(info.GetIsolate(), v8Value, exceptionStat
e); | 115 double cppValue = toRestrictedDouble(info.GetIsolate(), v8Value, exceptionStat
e); |
| 116 if (exceptionState.hadException()) | 116 if (exceptionState.hadException()) |
| 117 return; | 117 return; |
| 118 | 118 |
| 119 impl->setDoubleAttribute(cppValue); | 119 impl->setDoubleAttribute(cppValue); |
| 120 } | 120 } |
| 121 | 121 |
| 122 void doubleAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) { | 122 void doubleAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) { |
| 123 v8::Local<v8::Value> v8Value = info[0]; | 123 v8::Local<v8::Value> v8Value = info[0]; |
| 124 | 124 |
| 125 TestInterface5ImplementationV8Internal::doubleAttributeAttributeSetter(v8Value
, info); | 125 TestInterface5ImplementationV8Internal::doubleAttributeAttributeSetter(v8Value
, info); |
| 126 } | 126 } |
| 127 | 127 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 139 | 139 |
| 140 static void floatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::FunctionCallbackInfo<v8::Value>& info) { | 140 static void floatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::FunctionCallbackInfo<v8::Value>& info) { |
| 141 v8::Local<v8::Object> holder = info.Holder(); | 141 v8::Local<v8::Object> holder = info.Holder(); |
| 142 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 142 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 143 | 143 |
| 144 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext
, "TestInterface5", "floatAttribute"); | 144 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext
, "TestInterface5", "floatAttribute"); |
| 145 | 145 |
| 146 // Prepare the value to be set. | 146 // Prepare the value to be set. |
| 147 float cppValue = toRestrictedFloat(info.GetIsolate(), v8Value, exceptionState)
; | 147 float cppValue = toRestrictedFloat(info.GetIsolate(), v8Value, exceptionState)
; |
| 148 if (exceptionState.hadException()) | 148 if (exceptionState.hadException()) |
| 149 return; | 149 return; |
| 150 | 150 |
| 151 impl->setFloatAttribute(cppValue); | 151 impl->setFloatAttribute(cppValue); |
| 152 } | 152 } |
| 153 | 153 |
| 154 void floatAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& info) { | 154 void floatAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& info) { |
| 155 v8::Local<v8::Value> v8Value = info[0]; | 155 v8::Local<v8::Value> v8Value = info[0]; |
| 156 | 156 |
| 157 TestInterface5ImplementationV8Internal::floatAttributeAttributeSetter(v8Value,
info); | 157 TestInterface5ImplementationV8Internal::floatAttributeAttributeSetter(v8Value,
info); |
| 158 } | 158 } |
| 159 | 159 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 171 | 171 |
| 172 static void unrestrictedDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::FunctionCallbackInfo<v8::Value>& info) { | 172 static void unrestrictedDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::FunctionCallbackInfo<v8::Value>& info) { |
| 173 v8::Local<v8::Object> holder = info.Holder(); | 173 v8::Local<v8::Object> holder = info.Holder(); |
| 174 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 174 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 175 | 175 |
| 176 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext
, "TestInterface5", "unrestrictedDoubleAttribute"); | 176 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext
, "TestInterface5", "unrestrictedDoubleAttribute"); |
| 177 | 177 |
| 178 // Prepare the value to be set. | 178 // Prepare the value to be set. |
| 179 double cppValue = toDouble(info.GetIsolate(), v8Value, exceptionState); | 179 double cppValue = toDouble(info.GetIsolate(), v8Value, exceptionState); |
| 180 if (exceptionState.hadException()) | 180 if (exceptionState.hadException()) |
| 181 return; | 181 return; |
| 182 | 182 |
| 183 impl->setUnrestrictedDoubleAttribute(cppValue); | 183 impl->setUnrestrictedDoubleAttribute(cppValue); |
| 184 } | 184 } |
| 185 | 185 |
| 186 void unrestrictedDoubleAttributeAttributeSetterCallback(const v8::FunctionCallba
ckInfo<v8::Value>& info) { | 186 void unrestrictedDoubleAttributeAttributeSetterCallback(const v8::FunctionCallba
ckInfo<v8::Value>& info) { |
| 187 v8::Local<v8::Value> v8Value = info[0]; | 187 v8::Local<v8::Value> v8Value = info[0]; |
| 188 | 188 |
| 189 TestInterface5ImplementationV8Internal::unrestrictedDoubleAttributeAttributeSe
tter(v8Value, info); | 189 TestInterface5ImplementationV8Internal::unrestrictedDoubleAttributeAttributeSe
tter(v8Value, info); |
| 190 } | 190 } |
| 191 | 191 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 203 | 203 |
| 204 static void unrestrictedFloatAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::FunctionCallbackInfo<v8::Value>& info) { | 204 static void unrestrictedFloatAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::FunctionCallbackInfo<v8::Value>& info) { |
| 205 v8::Local<v8::Object> holder = info.Holder(); | 205 v8::Local<v8::Object> holder = info.Holder(); |
| 206 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 206 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 207 | 207 |
| 208 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext
, "TestInterface5", "unrestrictedFloatAttribute"); | 208 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext
, "TestInterface5", "unrestrictedFloatAttribute"); |
| 209 | 209 |
| 210 // Prepare the value to be set. | 210 // Prepare the value to be set. |
| 211 float cppValue = toFloat(info.GetIsolate(), v8Value, exceptionState); | 211 float cppValue = toFloat(info.GetIsolate(), v8Value, exceptionState); |
| 212 if (exceptionState.hadException()) | 212 if (exceptionState.hadException()) |
| 213 return; | 213 return; |
| 214 | 214 |
| 215 impl->setUnrestrictedFloatAttribute(cppValue); | 215 impl->setUnrestrictedFloatAttribute(cppValue); |
| 216 } | 216 } |
| 217 | 217 |
| 218 void unrestrictedFloatAttributeAttributeSetterCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) { | 218 void unrestrictedFloatAttributeAttributeSetterCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) { |
| 219 v8::Local<v8::Value> v8Value = info[0]; | 219 v8::Local<v8::Value> v8Value = info[0]; |
| 220 | 220 |
| 221 TestInterface5ImplementationV8Internal::unrestrictedFloatAttributeAttributeSet
ter(v8Value, info); | 221 TestInterface5ImplementationV8Internal::unrestrictedFloatAttributeAttributeSet
ter(v8Value, info); |
| 222 } | 222 } |
| 223 | 223 |
| 224 static void staticStringAttributeAttributeGetter(const v8::FunctionCallbackInfo<
v8::Value>& info) { | 224 static void staticStringAttributeAttributeGetter(const v8::FunctionCallbackInfo<
v8::Value>& info) { |
| 225 v8SetReturnValueString(info, TestInterface5Implementation::staticStringAttribu
te(), info.GetIsolate()); | 225 v8SetReturnValueString(info, TestInterface5Implementation::staticStringAttribu
te(), info.GetIsolate()); |
| 226 } | 226 } |
| 227 | 227 |
| 228 void staticStringAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) { | 228 void staticStringAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) { |
| 229 TestInterface5ImplementationV8Internal::staticStringAttributeAttributeGetter(i
nfo); | 229 TestInterface5ImplementationV8Internal::staticStringAttributeAttributeGetter(i
nfo); |
| 230 } | 230 } |
| 231 | 231 |
| 232 static void staticStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::FunctionCallbackInfo<v8::Value>& info) { | 232 static void staticStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::FunctionCallbackInfo<v8::Value>& info) { |
| 233 // Prepare the value to be set. | 233 // Prepare the value to be set. |
| 234 V8StringResource<> cppValue = v8Value; | 234 V8StringResource<> cppValue = v8Value; |
| 235 if (!cppValue.prepare()) | 235 if (!cppValue.prepare()) |
| 236 return; | 236 return; |
| 237 | 237 |
| 238 TestInterface5Implementation::setStaticStringAttribute(cppValue); | 238 TestInterface5Implementation::setStaticStringAttribute(cppValue); |
| 239 } | 239 } |
| 240 | 240 |
| 241 void staticStringAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) { | 241 void staticStringAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) { |
| 242 v8::Local<v8::Value> v8Value = info[0]; | 242 v8::Local<v8::Value> v8Value = info[0]; |
| 243 | 243 |
| 244 TestInterface5ImplementationV8Internal::staticStringAttributeAttributeSetter(v
8Value, info); | 244 TestInterface5ImplementationV8Internal::staticStringAttributeAttributeSetter(v
8Value, info); |
| 245 } | 245 } |
| 246 | 246 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 258 | 258 |
| 259 static void alwaysExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) { | 259 static void alwaysExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) { |
| 260 v8::Local<v8::Object> holder = info.Holder(); | 260 v8::Local<v8::Object> holder = info.Holder(); |
| 261 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 261 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 262 | 262 |
| 263 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext
, "TestInterface5", "alwaysExposedAttribute"); | 263 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext
, "TestInterface5", "alwaysExposedAttribute"); |
| 264 | 264 |
| 265 // Prepare the value to be set. | 265 // Prepare the value to be set. |
| 266 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exception
State); | 266 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exception
State); |
| 267 if (exceptionState.hadException()) | 267 if (exceptionState.hadException()) |
| 268 return; | 268 return; |
| 269 | 269 |
| 270 impl->setAlwaysExposedAttribute(cppValue); | 270 impl->setAlwaysExposedAttribute(cppValue); |
| 271 } | 271 } |
| 272 | 272 |
| 273 void alwaysExposedAttributeAttributeSetterCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) { | 273 void alwaysExposedAttributeAttributeSetterCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) { |
| 274 v8::Local<v8::Value> v8Value = info[0]; | 274 v8::Local<v8::Value> v8Value = info[0]; |
| 275 | 275 |
| 276 TestInterface5ImplementationV8Internal::alwaysExposedAttributeAttributeSetter(
v8Value, info); | 276 TestInterface5ImplementationV8Internal::alwaysExposedAttributeAttributeSetter(
v8Value, info); |
| 277 } | 277 } |
| 278 | 278 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 290 | 290 |
| 291 static void workerExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) { | 291 static void workerExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) { |
| 292 v8::Local<v8::Object> holder = info.Holder(); | 292 v8::Local<v8::Object> holder = info.Holder(); |
| 293 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 293 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 294 | 294 |
| 295 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext
, "TestInterface5", "workerExposedAttribute"); | 295 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext
, "TestInterface5", "workerExposedAttribute"); |
| 296 | 296 |
| 297 // Prepare the value to be set. | 297 // Prepare the value to be set. |
| 298 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exception
State); | 298 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exception
State); |
| 299 if (exceptionState.hadException()) | 299 if (exceptionState.hadException()) |
| 300 return; | 300 return; |
| 301 | 301 |
| 302 impl->setWorkerExposedAttribute(cppValue); | 302 impl->setWorkerExposedAttribute(cppValue); |
| 303 } | 303 } |
| 304 | 304 |
| 305 void workerExposedAttributeAttributeSetterCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) { | 305 void workerExposedAttributeAttributeSetterCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) { |
| 306 v8::Local<v8::Value> v8Value = info[0]; | 306 v8::Local<v8::Value> v8Value = info[0]; |
| 307 | 307 |
| 308 TestInterface5ImplementationV8Internal::workerExposedAttributeAttributeSetter(
v8Value, info); | 308 TestInterface5ImplementationV8Internal::workerExposedAttributeAttributeSetter(
v8Value, info); |
| 309 } | 309 } |
| 310 | 310 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 322 | 322 |
| 323 static void windowExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) { | 323 static void windowExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) { |
| 324 v8::Local<v8::Object> holder = info.Holder(); | 324 v8::Local<v8::Object> holder = info.Holder(); |
| 325 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 325 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 326 | 326 |
| 327 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext
, "TestInterface5", "windowExposedAttribute"); | 327 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext
, "TestInterface5", "windowExposedAttribute"); |
| 328 | 328 |
| 329 // Prepare the value to be set. | 329 // Prepare the value to be set. |
| 330 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exception
State); | 330 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exception
State); |
| 331 if (exceptionState.hadException()) | 331 if (exceptionState.hadException()) |
| 332 return; | 332 return; |
| 333 | 333 |
| 334 impl->setWindowExposedAttribute(cppValue); | 334 impl->setWindowExposedAttribute(cppValue); |
| 335 } | 335 } |
| 336 | 336 |
| 337 void windowExposedAttributeAttributeSetterCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) { | 337 void windowExposedAttributeAttributeSetterCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) { |
| 338 v8::Local<v8::Value> v8Value = info[0]; | 338 v8::Local<v8::Value> v8Value = info[0]; |
| 339 | 339 |
| 340 TestInterface5ImplementationV8Internal::windowExposedAttributeAttributeSetter(
v8Value, info); | 340 TestInterface5ImplementationV8Internal::windowExposedAttributeAttributeSetter(
v8Value, info); |
| 341 } | 341 } |
| 342 | 342 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 370 | 370 |
| 371 if (UNLIKELY(info.Length() < 2)) { | 371 if (UNLIKELY(info.Length() < 2)) { |
| 372 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, info.
Length())); | 372 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, info.
Length())); |
| 373 return; | 373 return; |
| 374 } | 374 } |
| 375 | 375 |
| 376 double doubleArg; | 376 double doubleArg; |
| 377 float floatArg; | 377 float floatArg; |
| 378 doubleArg = toRestrictedDouble(info.GetIsolate(), info[0], exceptionState); | 378 doubleArg = toRestrictedDouble(info.GetIsolate(), info[0], exceptionState); |
| 379 if (exceptionState.hadException()) | 379 if (exceptionState.hadException()) |
| 380 return; | 380 return; |
| 381 | 381 |
| 382 floatArg = toRestrictedFloat(info.GetIsolate(), info[1], exceptionState); | 382 floatArg = toRestrictedFloat(info.GetIsolate(), info[1], exceptionState); |
| 383 if (exceptionState.hadException()) | 383 if (exceptionState.hadException()) |
| 384 return; | 384 return; |
| 385 | 385 |
| 386 impl->voidMethodDoubleArgFloatArg(doubleArg, floatArg); | 386 impl->voidMethodDoubleArgFloatArg(doubleArg, floatArg); |
| 387 } | 387 } |
| 388 | 388 |
| 389 void voidMethodDoubleArgFloatArgMethodCallback(const v8::FunctionCallbackInfo<v8
::Value>& info) { | 389 void voidMethodDoubleArgFloatArgMethodCallback(const v8::FunctionCallbackInfo<v8
::Value>& info) { |
| 390 TestInterface5ImplementationV8Internal::voidMethodDoubleArgFloatArgMethod(info
); | 390 TestInterface5ImplementationV8Internal::voidMethodDoubleArgFloatArgMethod(info
); |
| 391 } | 391 } |
| 392 | 392 |
| 393 static void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethod(const v8::
FunctionCallbackInfo<v8::Value>& info) { | 393 static void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethod(const v8::
FunctionCallbackInfo<v8::Value>& info) { |
| 394 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCont
ext, "TestInterface5", "voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg"); | 394 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCont
ext, "TestInterface5", "voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg"); |
| 395 | 395 |
| 396 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()); | 396 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()); |
| 397 | 397 |
| 398 if (UNLIKELY(info.Length() < 2)) { | 398 if (UNLIKELY(info.Length() < 2)) { |
| 399 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, info.
Length())); | 399 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, info.
Length())); |
| 400 return; | 400 return; |
| 401 } | 401 } |
| 402 | 402 |
| 403 double unrestrictedDoubleArg; | 403 double unrestrictedDoubleArg; |
| 404 float unrestrictedFloatArg; | 404 float unrestrictedFloatArg; |
| 405 unrestrictedDoubleArg = toDouble(info.GetIsolate(), info[0], exceptionState); | 405 unrestrictedDoubleArg = toDouble(info.GetIsolate(), info[0], exceptionState); |
| 406 if (exceptionState.hadException()) | 406 if (exceptionState.hadException()) |
| 407 return; | 407 return; |
| 408 | 408 |
| 409 unrestrictedFloatArg = toFloat(info.GetIsolate(), info[1], exceptionState); | 409 unrestrictedFloatArg = toFloat(info.GetIsolate(), info[1], exceptionState); |
| 410 if (exceptionState.hadException()) | 410 if (exceptionState.hadException()) |
| 411 return; | 411 return; |
| 412 | 412 |
| 413 impl->voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg(unrestrictedDoubleAr
g, unrestrictedFloatArg); | 413 impl->voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg(unrestrictedDoubleAr
g, unrestrictedFloatArg); |
| 414 } | 414 } |
| 415 | 415 |
| 416 void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCallback(const v8:
:FunctionCallbackInfo<v8::Value>& info) { | 416 void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCallback(const v8:
:FunctionCallbackInfo<v8::Value>& info) { |
| 417 TestInterface5ImplementationV8Internal::voidMethodUnrestrictedDoubleArgUnrestr
ictedFloatArgMethod(info); | 417 TestInterface5ImplementationV8Internal::voidMethodUnrestrictedDoubleArgUnrestr
ictedFloatArgMethod(info); |
| 418 } | 418 } |
| 419 | 419 |
| 420 static void voidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) { | 420 static void voidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) { |
| 421 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()); | 421 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()); |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 507 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()); | 507 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()); |
| 508 | 508 |
| 509 if (UNLIKELY(info.Length() < 1)) { | 509 if (UNLIKELY(info.Length() < 1)) { |
| 510 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.
Length())); | 510 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.
Length())); |
| 511 return; | 511 return; |
| 512 } | 512 } |
| 513 | 513 |
| 514 BooleanOrString arg; | 514 BooleanOrString arg; |
| 515 V8BooleanOrString::toImpl(info.GetIsolate(), info[0], arg, UnionTypeConversion
Mode::NotNullable, exceptionState); | 515 V8BooleanOrString::toImpl(info.GetIsolate(), info[0], arg, UnionTypeConversion
Mode::NotNullable, exceptionState); |
| 516 if (exceptionState.hadException()) | 516 if (exceptionState.hadException()) |
| 517 return; | 517 return; |
| 518 | 518 |
| 519 impl->voidMethodBooleanOrDOMStringArg(arg); | 519 impl->voidMethodBooleanOrDOMStringArg(arg); |
| 520 } | 520 } |
| 521 | 521 |
| 522 void voidMethodBooleanOrDOMStringArgMethodCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) { | 522 void voidMethodBooleanOrDOMStringArgMethodCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) { |
| 523 TestInterface5ImplementationV8Internal::voidMethodBooleanOrDOMStringArgMethod(
info); | 523 TestInterface5ImplementationV8Internal::voidMethodBooleanOrDOMStringArgMethod(
info); |
| 524 } | 524 } |
| 525 | 525 |
| 526 static void voidMethodDoubleOrDOMStringArgMethod(const v8::FunctionCallbackInfo<
v8::Value>& info) { | 526 static void voidMethodDoubleOrDOMStringArgMethod(const v8::FunctionCallbackInfo<
v8::Value>& info) { |
| 527 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCont
ext, "TestInterface5", "voidMethodDoubleOrDOMStringArg"); | 527 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCont
ext, "TestInterface5", "voidMethodDoubleOrDOMStringArg"); |
| 528 | 528 |
| 529 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()); | 529 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()); |
| 530 | 530 |
| 531 if (UNLIKELY(info.Length() < 1)) { | 531 if (UNLIKELY(info.Length() < 1)) { |
| 532 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.
Length())); | 532 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.
Length())); |
| 533 return; | 533 return; |
| 534 } | 534 } |
| 535 | 535 |
| 536 DoubleOrString arg; | 536 DoubleOrString arg; |
| 537 V8DoubleOrString::toImpl(info.GetIsolate(), info[0], arg, UnionTypeConversionM
ode::NotNullable, exceptionState); | 537 V8DoubleOrString::toImpl(info.GetIsolate(), info[0], arg, UnionTypeConversionM
ode::NotNullable, exceptionState); |
| 538 if (exceptionState.hadException()) | 538 if (exceptionState.hadException()) |
| 539 return; | 539 return; |
| 540 | 540 |
| 541 impl->voidMethodDoubleOrDOMStringArg(arg); | 541 impl->voidMethodDoubleOrDOMStringArg(arg); |
| 542 } | 542 } |
| 543 | 543 |
| 544 void voidMethodDoubleOrDOMStringArgMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) { | 544 void voidMethodDoubleOrDOMStringArgMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) { |
| 545 TestInterface5ImplementationV8Internal::voidMethodDoubleOrDOMStringArgMethod(i
nfo); | 545 TestInterface5ImplementationV8Internal::voidMethodDoubleOrDOMStringArgMethod(i
nfo); |
| 546 } | 546 } |
| 547 | 547 |
| 548 static void voidMethodVoidExperimentalCallbackFunctionMethod(const v8::FunctionC
allbackInfo<v8::Value>& info) { | 548 static void voidMethodVoidExperimentalCallbackFunctionMethod(const v8::FunctionC
allbackInfo<v8::Value>& info) { |
| 549 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()); | 549 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()); |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 719 return; | 719 return; |
| 720 const AtomicString& propertyName = toCoreAtomicString(name.As<v8::String>()); | 720 const AtomicString& propertyName = toCoreAtomicString(name.As<v8::String>()); |
| 721 | 721 |
| 722 TestInterface5ImplementationV8Internal::namedPropertyGetter(propertyName, info
); | 722 TestInterface5ImplementationV8Internal::namedPropertyGetter(propertyName, info
); |
| 723 } | 723 } |
| 724 | 724 |
| 725 static void namedPropertySetter(const AtomicString& name, v8::Local<v8::Value> v
8Value, const v8::PropertyCallbackInfo<v8::Value>& info) { | 725 static void namedPropertySetter(const AtomicString& name, v8::Local<v8::Value> v
8Value, const v8::PropertyCallbackInfo<v8::Value>& info) { |
| 726 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()); | 726 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()); |
| 727 V8StringResource<> propertyValue = v8Value; | 727 V8StringResource<> propertyValue = v8Value; |
| 728 if (!propertyValue.prepare()) | 728 if (!propertyValue.prepare()) |
| 729 return; | 729 return; |
| 730 | 730 |
| 731 bool result = impl->anonymousNamedSetter(name, propertyValue); | 731 bool result = impl->anonymousNamedSetter(name, propertyValue); |
| 732 if (!result) | 732 if (!result) |
| 733 return; | 733 return; |
| 734 v8SetReturnValue(info, v8Value); | 734 v8SetReturnValue(info, v8Value); |
| 735 } | 735 } |
| 736 | 736 |
| 737 void namedPropertySetterCallback(v8::Local<v8::Name> name, v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<v8::Value>& info) { | 737 void namedPropertySetterCallback(v8::Local<v8::Name> name, v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<v8::Value>& info) { |
| 738 if (!name->IsString()) | 738 if (!name->IsString()) |
| 739 return; | 739 return; |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 810 } | 810 } |
| 811 | 811 |
| 812 void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCallbackInf
o<v8::Value>& info) { | 812 void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCallbackInf
o<v8::Value>& info) { |
| 813 TestInterface5ImplementationV8Internal::indexedPropertyGetter(index, info); | 813 TestInterface5ImplementationV8Internal::indexedPropertyGetter(index, info); |
| 814 } | 814 } |
| 815 | 815 |
| 816 static void indexedPropertySetter(uint32_t index, v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<v8::Value>& info) { | 816 static void indexedPropertySetter(uint32_t index, v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<v8::Value>& info) { |
| 817 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()); | 817 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()); |
| 818 V8StringResource<> propertyValue = v8Value; | 818 V8StringResource<> propertyValue = v8Value; |
| 819 if (!propertyValue.prepare()) | 819 if (!propertyValue.prepare()) |
| 820 return; | 820 return; |
| 821 | 821 |
| 822 bool result = impl->anonymousIndexedSetter(index, propertyValue); | 822 bool result = impl->anonymousIndexedSetter(index, propertyValue); |
| 823 if (!result) | 823 if (!result) |
| 824 return; | 824 return; |
| 825 v8SetReturnValue(info, v8Value); | 825 v8SetReturnValue(info, v8Value); |
| 826 } | 826 } |
| 827 | 827 |
| 828 void indexedPropertySetterCallback(uint32_t index, v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<v8::Value>& info) { | 828 void indexedPropertySetterCallback(uint32_t index, v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<v8::Value>& info) { |
| 829 TestInterface5ImplementationV8Internal::indexedPropertySetter(index, v8Value,
info); | 829 TestInterface5ImplementationV8Internal::indexedPropertySetter(index, v8Value,
info); |
| 830 } | 830 } |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 975 const V8DOMConfiguration::MethodConfiguration windowExposedStaticMethodMet
hodConfiguration = {"windowExposedStaticMethod", TestInterface5ImplementationV8I
nternal::windowExposedStaticMethodMethodCallback, 0, 0, v8::None, V8DOMConfigura
tion::ExposedToAllScripts, V8DOMConfiguration::OnInterface}; | 975 const V8DOMConfiguration::MethodConfiguration windowExposedStaticMethodMet
hodConfiguration = {"windowExposedStaticMethod", TestInterface5ImplementationV8I
nternal::windowExposedStaticMethodMethodCallback, 0, 0, v8::None, V8DOMConfigura
tion::ExposedToAllScripts, V8DOMConfiguration::OnInterface}; |
| 976 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(),
prototypeObject, interfaceObject, signature, windowExposedStaticMethodMethodCon
figuration); | 976 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(),
prototypeObject, interfaceObject, signature, windowExposedStaticMethodMethodCon
figuration); |
| 977 } | 977 } |
| 978 if (executionContext && (executionContext->isDocument() || executionContext->i
sServiceWorkerGlobalScope())) { | 978 if (executionContext && (executionContext->isDocument() || executionContext->i
sServiceWorkerGlobalScope())) { |
| 979 const V8DOMConfiguration::MethodConfiguration windowAndServiceWorkerExpose
dMethodMethodConfiguration = {"windowAndServiceWorkerExposedMethod", TestInterfa
ce5ImplementationV8Internal::windowAndServiceWorkerExposedMethodMethodCallback,
0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnP
rototype}; | 979 const V8DOMConfiguration::MethodConfiguration windowAndServiceWorkerExpose
dMethodMethodConfiguration = {"windowAndServiceWorkerExposedMethod", TestInterfa
ce5ImplementationV8Internal::windowAndServiceWorkerExposedMethodMethodCallback,
0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnP
rototype}; |
| 980 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(),
prototypeObject, interfaceObject, signature, windowAndServiceWorkerExposedMetho
dMethodConfiguration); | 980 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(),
prototypeObject, interfaceObject, signature, windowAndServiceWorkerExposedMetho
dMethodConfiguration); |
| 981 } | 981 } |
| 982 } | 982 } |
| 983 | 983 |
| 984 } // namespace blink | 984 } // namespace blink |
| OLD | NEW |