Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(417)

Side by Side Diff: Source/bindings/tests/results/V8TestObject.cpp

Issue 460923002: Decouple arity errors creation from throwing. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "V8TestObject.h" 8 #include "V8TestObject.h"
9 9
10 #include "bindings/core/v8/BindingSecurity.h" 10 #include "bindings/core/v8/BindingSecurity.h"
(...skipping 5284 matching lines...) Expand 10 before | Expand all | Expand 10 after
5295 static void unsignedShortMethodMethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& info) 5295 static void unsignedShortMethodMethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& info)
5296 { 5296 {
5297 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 5297 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
5298 TestObjectV8Internal::unsignedShortMethodMethod(info); 5298 TestObjectV8Internal::unsignedShortMethodMethod(info);
5299 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 5299 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
5300 } 5300 }
5301 5301
5302 static void voidMethodDateArgMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo) 5302 static void voidMethodDateArgMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
5303 { 5303 {
5304 if (UNLIKELY(info.Length() < 1)) { 5304 if (UNLIKELY(info.Length() < 1)) {
5305 throwMinimumArityTypeErrorForMethod("voidMethodDateArg", "TestObject", 1 , info.Length(), info.GetIsolate()); 5305 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v oidMethodDateArg", "TestObject", 1, info.Length(), info.GetIsolate()), info.GetI solate());
5306 return; 5306 return;
5307 } 5307 }
5308 TestObject* impl = V8TestObject::toNative(info.Holder()); 5308 TestObject* impl = V8TestObject::toNative(info.Holder());
5309 double dateArg; 5309 double dateArg;
5310 { 5310 {
5311 v8::TryCatch block; 5311 v8::TryCatch block;
5312 V8RethrowTryCatchScope rethrow(block); 5312 V8RethrowTryCatchScope rethrow(block);
5313 TONATIVE_VOID_INTERNAL(dateArg, toCoreDate(info[0])); 5313 TONATIVE_VOID_INTERNAL(dateArg, toCoreDate(info[0]));
5314 } 5314 }
5315 impl->voidMethodDateArg(dateArg); 5315 impl->voidMethodDateArg(dateArg);
5316 } 5316 }
5317 5317
5318 static void voidMethodDateArgMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info) 5318 static void voidMethodDateArgMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info)
5319 { 5319 {
5320 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 5320 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
5321 TestObjectV8Internal::voidMethodDateArgMethod(info); 5321 TestObjectV8Internal::voidMethodDateArgMethod(info);
5322 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 5322 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
5323 } 5323 }
5324 5324
5325 static void voidMethodStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 5325 static void voidMethodStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5326 { 5326 {
5327 if (UNLIKELY(info.Length() < 1)) { 5327 if (UNLIKELY(info.Length() < 1)) {
5328 throwMinimumArityTypeErrorForMethod("voidMethodStringArg", "TestObject", 1, info.Length(), info.GetIsolate()); 5328 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v oidMethodStringArg", "TestObject", 1, info.Length(), info.GetIsolate()), info.Ge tIsolate());
5329 return; 5329 return;
5330 } 5330 }
5331 TestObject* impl = V8TestObject::toNative(info.Holder()); 5331 TestObject* impl = V8TestObject::toNative(info.Holder());
5332 V8StringResource<> stringArg; 5332 V8StringResource<> stringArg;
5333 { 5333 {
5334 TOSTRING_VOID_INTERNAL(stringArg, info[0]); 5334 TOSTRING_VOID_INTERNAL(stringArg, info[0]);
5335 } 5335 }
5336 impl->voidMethodStringArg(stringArg); 5336 impl->voidMethodStringArg(stringArg);
5337 } 5337 }
5338 5338
5339 static void voidMethodStringArgMethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& info) 5339 static void voidMethodStringArgMethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& info)
5340 { 5340 {
5341 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 5341 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
5342 TestObjectV8Internal::voidMethodStringArgMethod(info); 5342 TestObjectV8Internal::voidMethodStringArgMethod(info);
5343 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 5343 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
5344 } 5344 }
5345 5345
5346 static void voidMethodByteStringArgMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info) 5346 static void voidMethodByteStringArgMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info)
5347 { 5347 {
5348 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodB yteStringArg", "TestObject", info.Holder(), info.GetIsolate()); 5348 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodB yteStringArg", "TestObject", info.Holder(), info.GetIsolate());
5349 if (UNLIKELY(info.Length() < 1)) { 5349 if (UNLIKELY(info.Length() < 1)) {
5350 throwMinimumArityTypeError(exceptionState, 1, info.Length()); 5350 setMinimumArityTypeError(exceptionState, 1, info.Length());
5351 exceptionState.throwIfNeeded();
5351 return; 5352 return;
5352 } 5353 }
5353 TestObject* impl = V8TestObject::toNative(info.Holder()); 5354 TestObject* impl = V8TestObject::toNative(info.Holder());
5354 V8StringResource<> stringArg; 5355 V8StringResource<> stringArg;
5355 { 5356 {
5356 v8::TryCatch block; 5357 v8::TryCatch block;
5357 V8RethrowTryCatchScope rethrow(block); 5358 V8RethrowTryCatchScope rethrow(block);
5358 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(stringArg, toByteString(info[0], e xceptionState), exceptionState); 5359 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(stringArg, toByteString(info[0], e xceptionState), exceptionState);
5359 } 5360 }
5360 impl->voidMethodByteStringArg(stringArg); 5361 impl->voidMethodByteStringArg(stringArg);
5361 } 5362 }
5362 5363
5363 static void voidMethodByteStringArgMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info) 5364 static void voidMethodByteStringArgMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info)
5364 { 5365 {
5365 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 5366 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
5366 TestObjectV8Internal::voidMethodByteStringArgMethod(info); 5367 TestObjectV8Internal::voidMethodByteStringArgMethod(info);
5367 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 5368 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
5368 } 5369 }
5369 5370
5370 static void voidMethodScalarValueStringArgMethod(const v8::FunctionCallbackInfo< v8::Value>& info) 5371 static void voidMethodScalarValueStringArgMethod(const v8::FunctionCallbackInfo< v8::Value>& info)
5371 { 5372 {
5372 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodS calarValueStringArg", "TestObject", info.Holder(), info.GetIsolate()); 5373 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodS calarValueStringArg", "TestObject", info.Holder(), info.GetIsolate());
5373 if (UNLIKELY(info.Length() < 1)) { 5374 if (UNLIKELY(info.Length() < 1)) {
5374 throwMinimumArityTypeError(exceptionState, 1, info.Length()); 5375 setMinimumArityTypeError(exceptionState, 1, info.Length());
5376 exceptionState.throwIfNeeded();
5375 return; 5377 return;
5376 } 5378 }
5377 TestObject* impl = V8TestObject::toNative(info.Holder()); 5379 TestObject* impl = V8TestObject::toNative(info.Holder());
5378 V8StringResource<> scalarValueStringArg; 5380 V8StringResource<> scalarValueStringArg;
5379 { 5381 {
5380 v8::TryCatch block; 5382 v8::TryCatch block;
5381 V8RethrowTryCatchScope rethrow(block); 5383 V8RethrowTryCatchScope rethrow(block);
5382 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(scalarValueStringArg, toScalarValu eString(info[0], exceptionState), exceptionState); 5384 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(scalarValueStringArg, toScalarValu eString(info[0], exceptionState), exceptionState);
5383 } 5385 }
5384 impl->voidMethodScalarValueStringArg(scalarValueStringArg); 5386 impl->voidMethodScalarValueStringArg(scalarValueStringArg);
5385 } 5387 }
5386 5388
5387 static void voidMethodScalarValueStringArgMethodCallback(const v8::FunctionCallb ackInfo<v8::Value>& info) 5389 static void voidMethodScalarValueStringArgMethodCallback(const v8::FunctionCallb ackInfo<v8::Value>& info)
5388 { 5390 {
5389 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 5391 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
5390 TestObjectV8Internal::voidMethodScalarValueStringArgMethod(info); 5392 TestObjectV8Internal::voidMethodScalarValueStringArgMethod(info);
5391 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 5393 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
5392 } 5394 }
5393 5395
5394 static void voidMethodDOMTimeStampArgMethod(const v8::FunctionCallbackInfo<v8::V alue>& info) 5396 static void voidMethodDOMTimeStampArgMethod(const v8::FunctionCallbackInfo<v8::V alue>& info)
5395 { 5397 {
5396 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD OMTimeStampArg", "TestObject", info.Holder(), info.GetIsolate()); 5398 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD OMTimeStampArg", "TestObject", info.Holder(), info.GetIsolate());
5397 if (UNLIKELY(info.Length() < 1)) { 5399 if (UNLIKELY(info.Length() < 1)) {
5398 throwMinimumArityTypeError(exceptionState, 1, info.Length()); 5400 setMinimumArityTypeError(exceptionState, 1, info.Length());
5401 exceptionState.throwIfNeeded();
5399 return; 5402 return;
5400 } 5403 }
5401 TestObject* impl = V8TestObject::toNative(info.Holder()); 5404 TestObject* impl = V8TestObject::toNative(info.Holder());
5402 unsigned long long domTimeStampArg; 5405 unsigned long long domTimeStampArg;
5403 { 5406 {
5404 v8::TryCatch block; 5407 v8::TryCatch block;
5405 V8RethrowTryCatchScope rethrow(block); 5408 V8RethrowTryCatchScope rethrow(block);
5406 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(domTimeStampArg, toUInt64(info[0], exceptionState), exceptionState); 5409 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(domTimeStampArg, toUInt64(info[0], exceptionState), exceptionState);
5407 } 5410 }
5408 impl->voidMethodDOMTimeStampArg(domTimeStampArg); 5411 impl->voidMethodDOMTimeStampArg(domTimeStampArg);
5409 } 5412 }
5410 5413
5411 static void voidMethodDOMTimeStampArgMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info) 5414 static void voidMethodDOMTimeStampArgMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info)
5412 { 5415 {
5413 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 5416 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
5414 TestObjectV8Internal::voidMethodDOMTimeStampArgMethod(info); 5417 TestObjectV8Internal::voidMethodDOMTimeStampArgMethod(info);
5415 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 5418 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
5416 } 5419 }
5417 5420
5418 static void voidMethodBooleanArgMethod(const v8::FunctionCallbackInfo<v8::Value> & info) 5421 static void voidMethodBooleanArgMethod(const v8::FunctionCallbackInfo<v8::Value> & info)
5419 { 5422 {
5420 if (UNLIKELY(info.Length() < 1)) { 5423 if (UNLIKELY(info.Length() < 1)) {
5421 throwMinimumArityTypeErrorForMethod("voidMethodBooleanArg", "TestObject" , 1, info.Length(), info.GetIsolate()); 5424 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v oidMethodBooleanArg", "TestObject", 1, info.Length(), info.GetIsolate()), info.G etIsolate());
5422 return; 5425 return;
5423 } 5426 }
5424 TestObject* impl = V8TestObject::toNative(info.Holder()); 5427 TestObject* impl = V8TestObject::toNative(info.Holder());
5425 bool booleanArg; 5428 bool booleanArg;
5426 { 5429 {
5427 v8::TryCatch block; 5430 v8::TryCatch block;
5428 V8RethrowTryCatchScope rethrow(block); 5431 V8RethrowTryCatchScope rethrow(block);
5429 TONATIVE_VOID_INTERNAL(booleanArg, info[0]->BooleanValue()); 5432 TONATIVE_VOID_INTERNAL(booleanArg, info[0]->BooleanValue());
5430 } 5433 }
5431 impl->voidMethodBooleanArg(booleanArg); 5434 impl->voidMethodBooleanArg(booleanArg);
5432 } 5435 }
5433 5436
5434 static void voidMethodBooleanArgMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info) 5437 static void voidMethodBooleanArgMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info)
5435 { 5438 {
5436 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 5439 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
5437 TestObjectV8Internal::voidMethodBooleanArgMethod(info); 5440 TestObjectV8Internal::voidMethodBooleanArgMethod(info);
5438 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 5441 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
5439 } 5442 }
5440 5443
5441 static void voidMethodByteArgMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo) 5444 static void voidMethodByteArgMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
5442 { 5445 {
5443 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodB yteArg", "TestObject", info.Holder(), info.GetIsolate()); 5446 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodB yteArg", "TestObject", info.Holder(), info.GetIsolate());
5444 if (UNLIKELY(info.Length() < 1)) { 5447 if (UNLIKELY(info.Length() < 1)) {
5445 throwMinimumArityTypeError(exceptionState, 1, info.Length()); 5448 setMinimumArityTypeError(exceptionState, 1, info.Length());
5449 exceptionState.throwIfNeeded();
5446 return; 5450 return;
5447 } 5451 }
5448 TestObject* impl = V8TestObject::toNative(info.Holder()); 5452 TestObject* impl = V8TestObject::toNative(info.Holder());
5449 int byteArg; 5453 int byteArg;
5450 { 5454 {
5451 v8::TryCatch block; 5455 v8::TryCatch block;
5452 V8RethrowTryCatchScope rethrow(block); 5456 V8RethrowTryCatchScope rethrow(block);
5453 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(byteArg, toInt8(info[0], exception State), exceptionState); 5457 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(byteArg, toInt8(info[0], exception State), exceptionState);
5454 } 5458 }
5455 impl->voidMethodByteArg(byteArg); 5459 impl->voidMethodByteArg(byteArg);
5456 } 5460 }
5457 5461
5458 static void voidMethodByteArgMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info) 5462 static void voidMethodByteArgMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info)
5459 { 5463 {
5460 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 5464 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
5461 TestObjectV8Internal::voidMethodByteArgMethod(info); 5465 TestObjectV8Internal::voidMethodByteArgMethod(info);
5462 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 5466 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
5463 } 5467 }
5464 5468
5465 static void voidMethodDoubleArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 5469 static void voidMethodDoubleArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5466 { 5470 {
5467 if (UNLIKELY(info.Length() < 1)) { 5471 if (UNLIKELY(info.Length() < 1)) {
5468 throwMinimumArityTypeErrorForMethod("voidMethodDoubleArg", "TestObject", 1, info.Length(), info.GetIsolate()); 5472 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v oidMethodDoubleArg", "TestObject", 1, info.Length(), info.GetIsolate()), info.Ge tIsolate());
5469 return; 5473 return;
5470 } 5474 }
5471 TestObject* impl = V8TestObject::toNative(info.Holder()); 5475 TestObject* impl = V8TestObject::toNative(info.Holder());
5472 double doubleArg; 5476 double doubleArg;
5473 { 5477 {
5474 v8::TryCatch block; 5478 v8::TryCatch block;
5475 V8RethrowTryCatchScope rethrow(block); 5479 V8RethrowTryCatchScope rethrow(block);
5476 TONATIVE_VOID_INTERNAL(doubleArg, static_cast<double>(info[0]->NumberVal ue())); 5480 TONATIVE_VOID_INTERNAL(doubleArg, static_cast<double>(info[0]->NumberVal ue()));
5477 } 5481 }
5478 impl->voidMethodDoubleArg(doubleArg); 5482 impl->voidMethodDoubleArg(doubleArg);
5479 } 5483 }
5480 5484
5481 static void voidMethodDoubleArgMethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& info) 5485 static void voidMethodDoubleArgMethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& info)
5482 { 5486 {
5483 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 5487 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
5484 TestObjectV8Internal::voidMethodDoubleArgMethod(info); 5488 TestObjectV8Internal::voidMethodDoubleArgMethod(info);
5485 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 5489 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
5486 } 5490 }
5487 5491
5488 static void voidMethodFloatArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 5492 static void voidMethodFloatArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5489 { 5493 {
5490 if (UNLIKELY(info.Length() < 1)) { 5494 if (UNLIKELY(info.Length() < 1)) {
5491 throwMinimumArityTypeErrorForMethod("voidMethodFloatArg", "TestObject", 1, info.Length(), info.GetIsolate()); 5495 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v oidMethodFloatArg", "TestObject", 1, info.Length(), info.GetIsolate()), info.Get Isolate());
5492 return; 5496 return;
5493 } 5497 }
5494 TestObject* impl = V8TestObject::toNative(info.Holder()); 5498 TestObject* impl = V8TestObject::toNative(info.Holder());
5495 float floatArg; 5499 float floatArg;
5496 { 5500 {
5497 v8::TryCatch block; 5501 v8::TryCatch block;
5498 V8RethrowTryCatchScope rethrow(block); 5502 V8RethrowTryCatchScope rethrow(block);
5499 TONATIVE_VOID_INTERNAL(floatArg, static_cast<float>(info[0]->NumberValue ())); 5503 TONATIVE_VOID_INTERNAL(floatArg, static_cast<float>(info[0]->NumberValue ()));
5500 } 5504 }
5501 impl->voidMethodFloatArg(floatArg); 5505 impl->voidMethodFloatArg(floatArg);
5502 } 5506 }
5503 5507
5504 static void voidMethodFloatArgMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info) 5508 static void voidMethodFloatArgMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info)
5505 { 5509 {
5506 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 5510 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
5507 TestObjectV8Internal::voidMethodFloatArgMethod(info); 5511 TestObjectV8Internal::voidMethodFloatArgMethod(info);
5508 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 5512 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
5509 } 5513 }
5510 5514
5511 static void voidMethodLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo) 5515 static void voidMethodLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
5512 { 5516 {
5513 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL ongArg", "TestObject", info.Holder(), info.GetIsolate()); 5517 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL ongArg", "TestObject", info.Holder(), info.GetIsolate());
5514 if (UNLIKELY(info.Length() < 1)) { 5518 if (UNLIKELY(info.Length() < 1)) {
5515 throwMinimumArityTypeError(exceptionState, 1, info.Length()); 5519 setMinimumArityTypeError(exceptionState, 1, info.Length());
5520 exceptionState.throwIfNeeded();
5516 return; 5521 return;
5517 } 5522 }
5518 TestObject* impl = V8TestObject::toNative(info.Holder()); 5523 TestObject* impl = V8TestObject::toNative(info.Holder());
5519 int longArg; 5524 int longArg;
5520 { 5525 {
5521 v8::TryCatch block; 5526 v8::TryCatch block;
5522 V8RethrowTryCatchScope rethrow(block); 5527 V8RethrowTryCatchScope rethrow(block);
5523 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio nState), exceptionState); 5528 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio nState), exceptionState);
5524 } 5529 }
5525 impl->voidMethodLongArg(longArg); 5530 impl->voidMethodLongArg(longArg);
5526 } 5531 }
5527 5532
5528 static void voidMethodLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info) 5533 static void voidMethodLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info)
5529 { 5534 {
5530 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 5535 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
5531 TestObjectV8Internal::voidMethodLongArgMethod(info); 5536 TestObjectV8Internal::voidMethodLongArgMethod(info);
5532 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 5537 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
5533 } 5538 }
5534 5539
5535 static void voidMethodLongLongArgMethod(const v8::FunctionCallbackInfo<v8::Value >& info) 5540 static void voidMethodLongLongArgMethod(const v8::FunctionCallbackInfo<v8::Value >& info)
5536 { 5541 {
5537 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL ongLongArg", "TestObject", info.Holder(), info.GetIsolate()); 5542 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL ongLongArg", "TestObject", info.Holder(), info.GetIsolate());
5538 if (UNLIKELY(info.Length() < 1)) { 5543 if (UNLIKELY(info.Length() < 1)) {
5539 throwMinimumArityTypeError(exceptionState, 1, info.Length()); 5544 setMinimumArityTypeError(exceptionState, 1, info.Length());
5545 exceptionState.throwIfNeeded();
5540 return; 5546 return;
5541 } 5547 }
5542 TestObject* impl = V8TestObject::toNative(info.Holder()); 5548 TestObject* impl = V8TestObject::toNative(info.Holder());
5543 long long longLongArg; 5549 long long longLongArg;
5544 { 5550 {
5545 v8::TryCatch block; 5551 v8::TryCatch block;
5546 V8RethrowTryCatchScope rethrow(block); 5552 V8RethrowTryCatchScope rethrow(block);
5547 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longLongArg, toInt64(info[0], exce ptionState), exceptionState); 5553 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longLongArg, toInt64(info[0], exce ptionState), exceptionState);
5548 } 5554 }
5549 impl->voidMethodLongLongArg(longLongArg); 5555 impl->voidMethodLongLongArg(longLongArg);
5550 } 5556 }
5551 5557
5552 static void voidMethodLongLongArgMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info) 5558 static void voidMethodLongLongArgMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info)
5553 { 5559 {
5554 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 5560 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
5555 TestObjectV8Internal::voidMethodLongLongArgMethod(info); 5561 TestObjectV8Internal::voidMethodLongLongArgMethod(info);
5556 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 5562 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
5557 } 5563 }
5558 5564
5559 static void voidMethodOctetArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 5565 static void voidMethodOctetArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5560 { 5566 {
5561 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodO ctetArg", "TestObject", info.Holder(), info.GetIsolate()); 5567 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodO ctetArg", "TestObject", info.Holder(), info.GetIsolate());
5562 if (UNLIKELY(info.Length() < 1)) { 5568 if (UNLIKELY(info.Length() < 1)) {
5563 throwMinimumArityTypeError(exceptionState, 1, info.Length()); 5569 setMinimumArityTypeError(exceptionState, 1, info.Length());
5570 exceptionState.throwIfNeeded();
5564 return; 5571 return;
5565 } 5572 }
5566 TestObject* impl = V8TestObject::toNative(info.Holder()); 5573 TestObject* impl = V8TestObject::toNative(info.Holder());
5567 unsigned octetArg; 5574 unsigned octetArg;
5568 { 5575 {
5569 v8::TryCatch block; 5576 v8::TryCatch block;
5570 V8RethrowTryCatchScope rethrow(block); 5577 V8RethrowTryCatchScope rethrow(block);
5571 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(octetArg, toUInt8(info[0], excepti onState), exceptionState); 5578 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(octetArg, toUInt8(info[0], excepti onState), exceptionState);
5572 } 5579 }
5573 impl->voidMethodOctetArg(octetArg); 5580 impl->voidMethodOctetArg(octetArg);
5574 } 5581 }
5575 5582
5576 static void voidMethodOctetArgMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info) 5583 static void voidMethodOctetArgMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info)
5577 { 5584 {
5578 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 5585 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
5579 TestObjectV8Internal::voidMethodOctetArgMethod(info); 5586 TestObjectV8Internal::voidMethodOctetArgMethod(info);
5580 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 5587 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
5581 } 5588 }
5582 5589
5583 static void voidMethodShortArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 5590 static void voidMethodShortArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5584 { 5591 {
5585 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodS hortArg", "TestObject", info.Holder(), info.GetIsolate()); 5592 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodS hortArg", "TestObject", info.Holder(), info.GetIsolate());
5586 if (UNLIKELY(info.Length() < 1)) { 5593 if (UNLIKELY(info.Length() < 1)) {
5587 throwMinimumArityTypeError(exceptionState, 1, info.Length()); 5594 setMinimumArityTypeError(exceptionState, 1, info.Length());
5595 exceptionState.throwIfNeeded();
5588 return; 5596 return;
5589 } 5597 }
5590 TestObject* impl = V8TestObject::toNative(info.Holder()); 5598 TestObject* impl = V8TestObject::toNative(info.Holder());
5591 int shortArg; 5599 int shortArg;
5592 { 5600 {
5593 v8::TryCatch block; 5601 v8::TryCatch block;
5594 V8RethrowTryCatchScope rethrow(block); 5602 V8RethrowTryCatchScope rethrow(block);
5595 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(shortArg, toInt16(info[0], excepti onState), exceptionState); 5603 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(shortArg, toInt16(info[0], excepti onState), exceptionState);
5596 } 5604 }
5597 impl->voidMethodShortArg(shortArg); 5605 impl->voidMethodShortArg(shortArg);
5598 } 5606 }
5599 5607
5600 static void voidMethodShortArgMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info) 5608 static void voidMethodShortArgMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info)
5601 { 5609 {
5602 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 5610 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
5603 TestObjectV8Internal::voidMethodShortArgMethod(info); 5611 TestObjectV8Internal::voidMethodShortArgMethod(info);
5604 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 5612 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
5605 } 5613 }
5606 5614
5607 static void voidMethodUnsignedLongArgMethod(const v8::FunctionCallbackInfo<v8::V alue>& info) 5615 static void voidMethodUnsignedLongArgMethod(const v8::FunctionCallbackInfo<v8::V alue>& info)
5608 { 5616 {
5609 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodU nsignedLongArg", "TestObject", info.Holder(), info.GetIsolate()); 5617 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodU nsignedLongArg", "TestObject", info.Holder(), info.GetIsolate());
5610 if (UNLIKELY(info.Length() < 1)) { 5618 if (UNLIKELY(info.Length() < 1)) {
5611 throwMinimumArityTypeError(exceptionState, 1, info.Length()); 5619 setMinimumArityTypeError(exceptionState, 1, info.Length());
5620 exceptionState.throwIfNeeded();
5612 return; 5621 return;
5613 } 5622 }
5614 TestObject* impl = V8TestObject::toNative(info.Holder()); 5623 TestObject* impl = V8TestObject::toNative(info.Holder());
5615 unsigned unsignedLongArg; 5624 unsigned unsignedLongArg;
5616 { 5625 {
5617 v8::TryCatch block; 5626 v8::TryCatch block;
5618 V8RethrowTryCatchScope rethrow(block); 5627 V8RethrowTryCatchScope rethrow(block);
5619 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(unsignedLongArg, toUInt32(info[0], exceptionState), exceptionState); 5628 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(unsignedLongArg, toUInt32(info[0], exceptionState), exceptionState);
5620 } 5629 }
5621 impl->voidMethodUnsignedLongArg(unsignedLongArg); 5630 impl->voidMethodUnsignedLongArg(unsignedLongArg);
5622 } 5631 }
5623 5632
5624 static void voidMethodUnsignedLongArgMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info) 5633 static void voidMethodUnsignedLongArgMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info)
5625 { 5634 {
5626 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 5635 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
5627 TestObjectV8Internal::voidMethodUnsignedLongArgMethod(info); 5636 TestObjectV8Internal::voidMethodUnsignedLongArgMethod(info);
5628 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 5637 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
5629 } 5638 }
5630 5639
5631 static void voidMethodUnsignedLongLongArgMethod(const v8::FunctionCallbackInfo<v 8::Value>& info) 5640 static void voidMethodUnsignedLongLongArgMethod(const v8::FunctionCallbackInfo<v 8::Value>& info)
5632 { 5641 {
5633 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodU nsignedLongLongArg", "TestObject", info.Holder(), info.GetIsolate()); 5642 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodU nsignedLongLongArg", "TestObject", info.Holder(), info.GetIsolate());
5634 if (UNLIKELY(info.Length() < 1)) { 5643 if (UNLIKELY(info.Length() < 1)) {
5635 throwMinimumArityTypeError(exceptionState, 1, info.Length()); 5644 setMinimumArityTypeError(exceptionState, 1, info.Length());
5645 exceptionState.throwIfNeeded();
5636 return; 5646 return;
5637 } 5647 }
5638 TestObject* impl = V8TestObject::toNative(info.Holder()); 5648 TestObject* impl = V8TestObject::toNative(info.Holder());
5639 unsigned long long unsignedLongLongArg; 5649 unsigned long long unsignedLongLongArg;
5640 { 5650 {
5641 v8::TryCatch block; 5651 v8::TryCatch block;
5642 V8RethrowTryCatchScope rethrow(block); 5652 V8RethrowTryCatchScope rethrow(block);
5643 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(unsignedLongLongArg, toUInt64(info [0], exceptionState), exceptionState); 5653 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(unsignedLongLongArg, toUInt64(info [0], exceptionState), exceptionState);
5644 } 5654 }
5645 impl->voidMethodUnsignedLongLongArg(unsignedLongLongArg); 5655 impl->voidMethodUnsignedLongLongArg(unsignedLongLongArg);
5646 } 5656 }
5647 5657
5648 static void voidMethodUnsignedLongLongArgMethodCallback(const v8::FunctionCallba ckInfo<v8::Value>& info) 5658 static void voidMethodUnsignedLongLongArgMethodCallback(const v8::FunctionCallba ckInfo<v8::Value>& info)
5649 { 5659 {
5650 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 5660 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
5651 TestObjectV8Internal::voidMethodUnsignedLongLongArgMethod(info); 5661 TestObjectV8Internal::voidMethodUnsignedLongLongArgMethod(info);
5652 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 5662 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
5653 } 5663 }
5654 5664
5655 static void voidMethodUnsignedShortArgMethod(const v8::FunctionCallbackInfo<v8:: Value>& info) 5665 static void voidMethodUnsignedShortArgMethod(const v8::FunctionCallbackInfo<v8:: Value>& info)
5656 { 5666 {
5657 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodU nsignedShortArg", "TestObject", info.Holder(), info.GetIsolate()); 5667 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodU nsignedShortArg", "TestObject", info.Holder(), info.GetIsolate());
5658 if (UNLIKELY(info.Length() < 1)) { 5668 if (UNLIKELY(info.Length() < 1)) {
5659 throwMinimumArityTypeError(exceptionState, 1, info.Length()); 5669 setMinimumArityTypeError(exceptionState, 1, info.Length());
5670 exceptionState.throwIfNeeded();
5660 return; 5671 return;
5661 } 5672 }
5662 TestObject* impl = V8TestObject::toNative(info.Holder()); 5673 TestObject* impl = V8TestObject::toNative(info.Holder());
5663 unsigned unsignedShortArg; 5674 unsigned unsignedShortArg;
5664 { 5675 {
5665 v8::TryCatch block; 5676 v8::TryCatch block;
5666 V8RethrowTryCatchScope rethrow(block); 5677 V8RethrowTryCatchScope rethrow(block);
5667 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(unsignedShortArg, toUInt16(info[0] , exceptionState), exceptionState); 5678 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(unsignedShortArg, toUInt16(info[0] , exceptionState), exceptionState);
5668 } 5679 }
5669 impl->voidMethodUnsignedShortArg(unsignedShortArg); 5680 impl->voidMethodUnsignedShortArg(unsignedShortArg);
(...skipping 15 matching lines...) Expand all
5685 static void testInterfaceEmptyMethodMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& info) 5696 static void testInterfaceEmptyMethodMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& info)
5686 { 5697 {
5687 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 5698 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
5688 TestObjectV8Internal::testInterfaceEmptyMethodMethod(info); 5699 TestObjectV8Internal::testInterfaceEmptyMethodMethod(info);
5689 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 5700 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
5690 } 5701 }
5691 5702
5692 static void voidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo <v8::Value>& info) 5703 static void voidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo <v8::Value>& info)
5693 { 5704 {
5694 if (UNLIKELY(info.Length() < 1)) { 5705 if (UNLIKELY(info.Length() < 1)) {
5695 throwMinimumArityTypeErrorForMethod("voidMethodTestInterfaceEmptyArg", " TestObject", 1, info.Length(), info.GetIsolate()); 5706 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v oidMethodTestInterfaceEmptyArg", "TestObject", 1, info.Length(), info.GetIsolate ()), info.GetIsolate());
5696 return; 5707 return;
5697 } 5708 }
5698 TestObject* impl = V8TestObject::toNative(info.Holder()); 5709 TestObject* impl = V8TestObject::toNative(info.Holder());
5699 TestInterfaceEmpty* testInterfaceEmptyArg; 5710 TestInterfaceEmpty* testInterfaceEmptyArg;
5700 { 5711 {
5701 v8::TryCatch block; 5712 v8::TryCatch block;
5702 V8RethrowTryCatchScope rethrow(block); 5713 V8RethrowTryCatchScope rethrow(block);
5703 TONATIVE_VOID_INTERNAL(testInterfaceEmptyArg, V8TestInterfaceEmpty::toNa tiveWithTypeCheck(info.GetIsolate(), info[0])); 5714 TONATIVE_VOID_INTERNAL(testInterfaceEmptyArg, V8TestInterfaceEmpty::toNa tiveWithTypeCheck(info.GetIsolate(), info[0]));
5704 } 5715 }
5705 impl->voidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg); 5716 impl->voidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg);
5706 } 5717 }
5707 5718
5708 static void voidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCall backInfo<v8::Value>& info) 5719 static void voidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCall backInfo<v8::Value>& info)
5709 { 5720 {
5710 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 5721 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
5711 TestObjectV8Internal::voidMethodTestInterfaceEmptyArgMethod(info); 5722 TestObjectV8Internal::voidMethodTestInterfaceEmptyArgMethod(info);
5712 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 5723 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
5713 } 5724 }
5714 5725
5715 static void voidMethodLongArgTestInterfaceEmptyArgMethod(const v8::FunctionCallb ackInfo<v8::Value>& info) 5726 static void voidMethodLongArgTestInterfaceEmptyArgMethod(const v8::FunctionCallb ackInfo<v8::Value>& info)
5716 { 5727 {
5717 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL ongArgTestInterfaceEmptyArg", "TestObject", info.Holder(), info.GetIsolate()); 5728 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL ongArgTestInterfaceEmptyArg", "TestObject", info.Holder(), info.GetIsolate());
5718 if (UNLIKELY(info.Length() < 2)) { 5729 if (UNLIKELY(info.Length() < 2)) {
5719 throwMinimumArityTypeError(exceptionState, 2, info.Length()); 5730 setMinimumArityTypeError(exceptionState, 2, info.Length());
5731 exceptionState.throwIfNeeded();
5720 return; 5732 return;
5721 } 5733 }
5722 TestObject* impl = V8TestObject::toNative(info.Holder()); 5734 TestObject* impl = V8TestObject::toNative(info.Holder());
5723 int longArg; 5735 int longArg;
5724 TestInterfaceEmpty* testInterfaceEmptyArg; 5736 TestInterfaceEmpty* testInterfaceEmptyArg;
5725 { 5737 {
5726 v8::TryCatch block; 5738 v8::TryCatch block;
5727 V8RethrowTryCatchScope rethrow(block); 5739 V8RethrowTryCatchScope rethrow(block);
5728 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio nState), exceptionState); 5740 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio nState), exceptionState);
5729 TONATIVE_VOID_INTERNAL(testInterfaceEmptyArg, V8TestInterfaceEmpty::toNa tiveWithTypeCheck(info.GetIsolate(), info[1])); 5741 TONATIVE_VOID_INTERNAL(testInterfaceEmptyArg, V8TestInterfaceEmpty::toNa tiveWithTypeCheck(info.GetIsolate(), info[1]));
(...skipping 30 matching lines...) Expand all
5760 static void anyCallbackFunctionOptionalAnyArgMethodMethodCallback(const v8::Func tionCallbackInfo<v8::Value>& info) 5772 static void anyCallbackFunctionOptionalAnyArgMethodMethodCallback(const v8::Func tionCallbackInfo<v8::Value>& info)
5761 { 5773 {
5762 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 5774 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
5763 TestObjectV8Internal::anyCallbackFunctionOptionalAnyArgMethodMethod(info); 5775 TestObjectV8Internal::anyCallbackFunctionOptionalAnyArgMethodMethod(info);
5764 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 5776 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
5765 } 5777 }
5766 5778
5767 static void voidMethodVoidCallbackFunctionArgMethod(const v8::FunctionCallbackIn fo<v8::Value>& info) 5779 static void voidMethodVoidCallbackFunctionArgMethod(const v8::FunctionCallbackIn fo<v8::Value>& info)
5768 { 5780 {
5769 if (UNLIKELY(info.Length() < 1)) { 5781 if (UNLIKELY(info.Length() < 1)) {
5770 throwMinimumArityTypeErrorForMethod("voidMethodVoidCallbackFunctionArg", "TestObject", 1, info.Length(), info.GetIsolate()); 5782 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v oidMethodVoidCallbackFunctionArg", "TestObject", 1, info.Length(), info.GetIsola te()), info.GetIsolate());
5771 return; 5783 return;
5772 } 5784 }
5773 TestObject* impl = V8TestObject::toNative(info.Holder()); 5785 TestObject* impl = V8TestObject::toNative(info.Holder());
5774 ScriptValue voidCallbackFunctionArg; 5786 ScriptValue voidCallbackFunctionArg;
5775 { 5787 {
5776 v8::TryCatch block; 5788 v8::TryCatch block;
5777 V8RethrowTryCatchScope rethrow(block); 5789 V8RethrowTryCatchScope rethrow(block);
5778 TONATIVE_VOID_INTERNAL(voidCallbackFunctionArg, ScriptValue(ScriptState: :current(info.GetIsolate()), info[0])); 5790 TONATIVE_VOID_INTERNAL(voidCallbackFunctionArg, ScriptValue(ScriptState: :current(info.GetIsolate()), info[0]));
5779 } 5791 }
5780 impl->voidMethodVoidCallbackFunctionArg(voidCallbackFunctionArg); 5792 impl->voidMethodVoidCallbackFunctionArg(voidCallbackFunctionArg);
5781 } 5793 }
5782 5794
5783 static void voidMethodVoidCallbackFunctionArgMethodCallback(const v8::FunctionCa llbackInfo<v8::Value>& info) 5795 static void voidMethodVoidCallbackFunctionArgMethodCallback(const v8::FunctionCa llbackInfo<v8::Value>& info)
5784 { 5796 {
5785 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 5797 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
5786 TestObjectV8Internal::voidMethodVoidCallbackFunctionArgMethod(info); 5798 TestObjectV8Internal::voidMethodVoidCallbackFunctionArgMethod(info);
5787 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 5799 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
5788 } 5800 }
5789 5801
5790 static void voidMethodAnyCallbackFunctionOptionalAnyArgMethod(const v8::Function CallbackInfo<v8::Value>& info) 5802 static void voidMethodAnyCallbackFunctionOptionalAnyArgMethod(const v8::Function CallbackInfo<v8::Value>& info)
5791 { 5803 {
5792 if (UNLIKELY(info.Length() < 1)) { 5804 if (UNLIKELY(info.Length() < 1)) {
5793 throwMinimumArityTypeErrorForMethod("voidMethodAnyCallbackFunctionOption alAnyArg", "TestObject", 1, info.Length(), info.GetIsolate()); 5805 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v oidMethodAnyCallbackFunctionOptionalAnyArg", "TestObject", 1, info.Length(), inf o.GetIsolate()), info.GetIsolate());
5794 return; 5806 return;
5795 } 5807 }
5796 TestObject* impl = V8TestObject::toNative(info.Holder()); 5808 TestObject* impl = V8TestObject::toNative(info.Holder());
5797 ScriptValue anyCallbackFunctionOptionalAnyArgArg; 5809 ScriptValue anyCallbackFunctionOptionalAnyArgArg;
5798 { 5810 {
5799 v8::TryCatch block; 5811 v8::TryCatch block;
5800 V8RethrowTryCatchScope rethrow(block); 5812 V8RethrowTryCatchScope rethrow(block);
5801 TONATIVE_VOID_INTERNAL(anyCallbackFunctionOptionalAnyArgArg, ScriptValue (ScriptState::current(info.GetIsolate()), info[0])); 5813 TONATIVE_VOID_INTERNAL(anyCallbackFunctionOptionalAnyArgArg, ScriptValue (ScriptState::current(info.GetIsolate()), info[0]));
5802 } 5814 }
5803 impl->voidMethodAnyCallbackFunctionOptionalAnyArg(anyCallbackFunctionOptiona lAnyArgArg); 5815 impl->voidMethodAnyCallbackFunctionOptionalAnyArg(anyCallbackFunctionOptiona lAnyArgArg);
(...skipping 28 matching lines...) Expand all
5832 static void anyMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& i nfo) 5844 static void anyMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
5833 { 5845 {
5834 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 5846 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
5835 TestObjectV8Internal::anyMethodMethod(info); 5847 TestObjectV8Internal::anyMethodMethod(info);
5836 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 5848 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
5837 } 5849 }
5838 5850
5839 static void voidMethodCompareHowArgMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info) 5851 static void voidMethodCompareHowArgMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info)
5840 { 5852 {
5841 if (UNLIKELY(info.Length() < 1)) { 5853 if (UNLIKELY(info.Length() < 1)) {
5842 throwMinimumArityTypeErrorForMethod("voidMethodCompareHowArg", "TestObje ct", 1, info.Length(), info.GetIsolate()); 5854 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v oidMethodCompareHowArg", "TestObject", 1, info.Length(), info.GetIsolate()), inf o.GetIsolate());
5843 return; 5855 return;
5844 } 5856 }
5845 TestObject* impl = V8TestObject::toNative(info.Holder()); 5857 TestObject* impl = V8TestObject::toNative(info.Holder());
5846 Range::CompareHow compareHowArg; 5858 Range::CompareHow compareHowArg;
5847 { 5859 {
5848 v8::TryCatch block; 5860 v8::TryCatch block;
5849 V8RethrowTryCatchScope rethrow(block); 5861 V8RethrowTryCatchScope rethrow(block);
5850 TONATIVE_VOID_INTERNAL(compareHowArg, static_cast<Range::CompareHow>(inf o[0]->Int32Value())); 5862 TONATIVE_VOID_INTERNAL(compareHowArg, static_cast<Range::CompareHow>(inf o[0]->Int32Value()));
5851 } 5863 }
5852 impl->voidMethodCompareHowArg(compareHowArg); 5864 impl->voidMethodCompareHowArg(compareHowArg);
5853 } 5865 }
5854 5866
5855 static void voidMethodCompareHowArgMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info) 5867 static void voidMethodCompareHowArgMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info)
5856 { 5868 {
5857 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 5869 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
5858 TestObjectV8Internal::voidMethodCompareHowArgMethod(info); 5870 TestObjectV8Internal::voidMethodCompareHowArgMethod(info);
5859 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 5871 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
5860 } 5872 }
5861 5873
5862 static void voidMethodEventTargetArgMethod(const v8::FunctionCallbackInfo<v8::Va lue>& info) 5874 static void voidMethodEventTargetArgMethod(const v8::FunctionCallbackInfo<v8::Va lue>& info)
5863 { 5875 {
5864 if (UNLIKELY(info.Length() < 1)) { 5876 if (UNLIKELY(info.Length() < 1)) {
5865 throwMinimumArityTypeErrorForMethod("voidMethodEventTargetArg", "TestObj ect", 1, info.Length(), info.GetIsolate()); 5877 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v oidMethodEventTargetArg", "TestObject", 1, info.Length(), info.GetIsolate()), in fo.GetIsolate());
5866 return; 5878 return;
5867 } 5879 }
5868 TestObject* impl = V8TestObject::toNative(info.Holder()); 5880 TestObject* impl = V8TestObject::toNative(info.Holder());
5869 EventTarget* eventTargetArg; 5881 EventTarget* eventTargetArg;
5870 { 5882 {
5871 v8::TryCatch block; 5883 v8::TryCatch block;
5872 V8RethrowTryCatchScope rethrow(block); 5884 V8RethrowTryCatchScope rethrow(block);
5873 TONATIVE_VOID_INTERNAL(eventTargetArg, V8DOMWrapper::isDOMWrapper(info[0 ]) ? toWrapperTypeInfo(v8::Handle<v8::Object>::Cast(info[0]))->toEventTarget(v8: :Handle<v8::Object>::Cast(info[0])) : 0); 5885 TONATIVE_VOID_INTERNAL(eventTargetArg, V8DOMWrapper::isDOMWrapper(info[0 ]) ? toWrapperTypeInfo(v8::Handle<v8::Object>::Cast(info[0]))->toEventTarget(v8: :Handle<v8::Object>::Cast(info[0])) : 0);
5874 } 5886 }
5875 impl->voidMethodEventTargetArg(eventTargetArg); 5887 impl->voidMethodEventTargetArg(eventTargetArg);
5876 } 5888 }
5877 5889
5878 static void voidMethodEventTargetArgMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& info) 5890 static void voidMethodEventTargetArgMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& info)
5879 { 5891 {
5880 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 5892 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
5881 TestObjectV8Internal::voidMethodEventTargetArgMethod(info); 5893 TestObjectV8Internal::voidMethodEventTargetArgMethod(info);
5882 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 5894 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
5883 } 5895 }
5884 5896
5885 static void voidMethodMediaQueryListListenerArgMethod(const v8::FunctionCallback Info<v8::Value>& info) 5897 static void voidMethodMediaQueryListListenerArgMethod(const v8::FunctionCallback Info<v8::Value>& info)
5886 { 5898 {
5887 if (UNLIKELY(info.Length() < 1)) { 5899 if (UNLIKELY(info.Length() < 1)) {
5888 throwMinimumArityTypeErrorForMethod("voidMethodMediaQueryListListenerArg ", "TestObject", 1, info.Length(), info.GetIsolate()); 5900 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v oidMethodMediaQueryListListenerArg", "TestObject", 1, info.Length(), info.GetIso late()), info.GetIsolate());
5889 return; 5901 return;
5890 } 5902 }
5891 TestObject* impl = V8TestObject::toNative(info.Holder()); 5903 TestObject* impl = V8TestObject::toNative(info.Holder());
5892 RefPtrWillBeRawPtr<MediaQueryListListener> mediaQueryListListenerArg; 5904 RefPtrWillBeRawPtr<MediaQueryListListener> mediaQueryListListenerArg;
5893 { 5905 {
5894 v8::TryCatch block; 5906 v8::TryCatch block;
5895 V8RethrowTryCatchScope rethrow(block); 5907 V8RethrowTryCatchScope rethrow(block);
5896 TONATIVE_VOID_INTERNAL(mediaQueryListListenerArg, MediaQueryListListener ::create(ScriptState::current(info.GetIsolate()), ScriptValue(ScriptState::curre nt(info.GetIsolate()), info[0]))); 5908 TONATIVE_VOID_INTERNAL(mediaQueryListListenerArg, MediaQueryListListener ::create(ScriptState::current(info.GetIsolate()), ScriptValue(ScriptState::curre nt(info.GetIsolate()), info[0])));
5897 } 5909 }
5898 impl->voidMethodMediaQueryListListenerArg(mediaQueryListListenerArg); 5910 impl->voidMethodMediaQueryListListenerArg(mediaQueryListListenerArg);
5899 } 5911 }
5900 5912
5901 static void voidMethodMediaQueryListListenerArgMethodCallback(const v8::Function CallbackInfo<v8::Value>& info) 5913 static void voidMethodMediaQueryListListenerArgMethodCallback(const v8::Function CallbackInfo<v8::Value>& info)
5902 { 5914 {
5903 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 5915 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
5904 TestObjectV8Internal::voidMethodMediaQueryListListenerArgMethod(info); 5916 TestObjectV8Internal::voidMethodMediaQueryListListenerArgMethod(info);
5905 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 5917 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
5906 } 5918 }
5907 5919
5908 static void voidMethodAnyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& in fo) 5920 static void voidMethodAnyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& in fo)
5909 { 5921 {
5910 if (UNLIKELY(info.Length() < 1)) { 5922 if (UNLIKELY(info.Length() < 1)) {
5911 throwMinimumArityTypeErrorForMethod("voidMethodAnyArg", "TestObject", 1, info.Length(), info.GetIsolate()); 5923 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v oidMethodAnyArg", "TestObject", 1, info.Length(), info.GetIsolate()), info.GetIs olate());
5912 return; 5924 return;
5913 } 5925 }
5914 TestObject* impl = V8TestObject::toNative(info.Holder()); 5926 TestObject* impl = V8TestObject::toNative(info.Holder());
5915 ScriptValue anyArg; 5927 ScriptValue anyArg;
5916 { 5928 {
5917 v8::TryCatch block; 5929 v8::TryCatch block;
5918 V8RethrowTryCatchScope rethrow(block); 5930 V8RethrowTryCatchScope rethrow(block);
5919 TONATIVE_VOID_INTERNAL(anyArg, ScriptValue(ScriptState::current(info.Get Isolate()), info[0])); 5931 TONATIVE_VOID_INTERNAL(anyArg, ScriptValue(ScriptState::current(info.Get Isolate()), info[0]));
5920 } 5932 }
5921 impl->voidMethodAnyArg(anyArg); 5933 impl->voidMethodAnyArg(anyArg);
5922 } 5934 }
5923 5935
5924 static void voidMethodAnyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Va lue>& info) 5936 static void voidMethodAnyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Va lue>& info)
5925 { 5937 {
5926 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 5938 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
5927 TestObjectV8Internal::voidMethodAnyArgMethod(info); 5939 TestObjectV8Internal::voidMethodAnyArgMethod(info);
5928 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 5940 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
5929 } 5941 }
5930 5942
5931 static void voidMethodAttrArgMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo) 5943 static void voidMethodAttrArgMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
5932 { 5944 {
5933 if (UNLIKELY(info.Length() < 1)) { 5945 if (UNLIKELY(info.Length() < 1)) {
5934 throwMinimumArityTypeErrorForMethod("voidMethodAttrArg", "TestObject", 1 , info.Length(), info.GetIsolate()); 5946 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v oidMethodAttrArg", "TestObject", 1, info.Length(), info.GetIsolate()), info.GetI solate());
5935 return; 5947 return;
5936 } 5948 }
5937 TestObject* impl = V8TestObject::toNative(info.Holder()); 5949 TestObject* impl = V8TestObject::toNative(info.Holder());
5938 Attr* attrArg; 5950 Attr* attrArg;
5939 { 5951 {
5940 v8::TryCatch block; 5952 v8::TryCatch block;
5941 V8RethrowTryCatchScope rethrow(block); 5953 V8RethrowTryCatchScope rethrow(block);
5942 TONATIVE_VOID_INTERNAL(attrArg, V8Attr::toNativeWithTypeCheck(info.GetIs olate(), info[0])); 5954 TONATIVE_VOID_INTERNAL(attrArg, V8Attr::toNativeWithTypeCheck(info.GetIs olate(), info[0]));
5943 } 5955 }
5944 impl->voidMethodAttrArg(attrArg); 5956 impl->voidMethodAttrArg(attrArg);
5945 } 5957 }
5946 5958
5947 static void voidMethodAttrArgMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info) 5959 static void voidMethodAttrArgMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info)
5948 { 5960 {
5949 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 5961 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
5950 TestObjectV8Internal::voidMethodAttrArgMethod(info); 5962 TestObjectV8Internal::voidMethodAttrArgMethod(info);
5951 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 5963 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
5952 } 5964 }
5953 5965
5954 static void voidMethodDocumentArgMethod(const v8::FunctionCallbackInfo<v8::Value >& info) 5966 static void voidMethodDocumentArgMethod(const v8::FunctionCallbackInfo<v8::Value >& info)
5955 { 5967 {
5956 if (UNLIKELY(info.Length() < 1)) { 5968 if (UNLIKELY(info.Length() < 1)) {
5957 throwMinimumArityTypeErrorForMethod("voidMethodDocumentArg", "TestObject ", 1, info.Length(), info.GetIsolate()); 5969 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v oidMethodDocumentArg", "TestObject", 1, info.Length(), info.GetIsolate()), info. GetIsolate());
5958 return; 5970 return;
5959 } 5971 }
5960 TestObject* impl = V8TestObject::toNative(info.Holder()); 5972 TestObject* impl = V8TestObject::toNative(info.Holder());
5961 Document* documentArg; 5973 Document* documentArg;
5962 { 5974 {
5963 v8::TryCatch block; 5975 v8::TryCatch block;
5964 V8RethrowTryCatchScope rethrow(block); 5976 V8RethrowTryCatchScope rethrow(block);
5965 TONATIVE_VOID_INTERNAL(documentArg, V8Document::toNativeWithTypeCheck(in fo.GetIsolate(), info[0])); 5977 TONATIVE_VOID_INTERNAL(documentArg, V8Document::toNativeWithTypeCheck(in fo.GetIsolate(), info[0]));
5966 } 5978 }
5967 impl->voidMethodDocumentArg(documentArg); 5979 impl->voidMethodDocumentArg(documentArg);
5968 } 5980 }
5969 5981
5970 static void voidMethodDocumentArgMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info) 5982 static void voidMethodDocumentArgMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info)
5971 { 5983 {
5972 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 5984 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
5973 TestObjectV8Internal::voidMethodDocumentArgMethod(info); 5985 TestObjectV8Internal::voidMethodDocumentArgMethod(info);
5974 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 5986 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
5975 } 5987 }
5976 5988
5977 static void voidMethodDocumentTypeArgMethod(const v8::FunctionCallbackInfo<v8::V alue>& info) 5989 static void voidMethodDocumentTypeArgMethod(const v8::FunctionCallbackInfo<v8::V alue>& info)
5978 { 5990 {
5979 if (UNLIKELY(info.Length() < 1)) { 5991 if (UNLIKELY(info.Length() < 1)) {
5980 throwMinimumArityTypeErrorForMethod("voidMethodDocumentTypeArg", "TestOb ject", 1, info.Length(), info.GetIsolate()); 5992 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v oidMethodDocumentTypeArg", "TestObject", 1, info.Length(), info.GetIsolate()), i nfo.GetIsolate());
5981 return; 5993 return;
5982 } 5994 }
5983 TestObject* impl = V8TestObject::toNative(info.Holder()); 5995 TestObject* impl = V8TestObject::toNative(info.Holder());
5984 DocumentType* documentTypeArg; 5996 DocumentType* documentTypeArg;
5985 { 5997 {
5986 v8::TryCatch block; 5998 v8::TryCatch block;
5987 V8RethrowTryCatchScope rethrow(block); 5999 V8RethrowTryCatchScope rethrow(block);
5988 TONATIVE_VOID_INTERNAL(documentTypeArg, V8DocumentType::toNativeWithType Check(info.GetIsolate(), info[0])); 6000 TONATIVE_VOID_INTERNAL(documentTypeArg, V8DocumentType::toNativeWithType Check(info.GetIsolate(), info[0]));
5989 } 6001 }
5990 impl->voidMethodDocumentTypeArg(documentTypeArg); 6002 impl->voidMethodDocumentTypeArg(documentTypeArg);
5991 } 6003 }
5992 6004
5993 static void voidMethodDocumentTypeArgMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info) 6005 static void voidMethodDocumentTypeArgMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info)
5994 { 6006 {
5995 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 6007 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
5996 TestObjectV8Internal::voidMethodDocumentTypeArgMethod(info); 6008 TestObjectV8Internal::voidMethodDocumentTypeArgMethod(info);
5997 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 6009 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
5998 } 6010 }
5999 6011
6000 static void voidMethodElementArgMethod(const v8::FunctionCallbackInfo<v8::Value> & info) 6012 static void voidMethodElementArgMethod(const v8::FunctionCallbackInfo<v8::Value> & info)
6001 { 6013 {
6002 if (UNLIKELY(info.Length() < 1)) { 6014 if (UNLIKELY(info.Length() < 1)) {
6003 throwMinimumArityTypeErrorForMethod("voidMethodElementArg", "TestObject" , 1, info.Length(), info.GetIsolate()); 6015 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v oidMethodElementArg", "TestObject", 1, info.Length(), info.GetIsolate()), info.G etIsolate());
6004 return; 6016 return;
6005 } 6017 }
6006 TestObject* impl = V8TestObject::toNative(info.Holder()); 6018 TestObject* impl = V8TestObject::toNative(info.Holder());
6007 Element* elementArg; 6019 Element* elementArg;
6008 { 6020 {
6009 v8::TryCatch block; 6021 v8::TryCatch block;
6010 V8RethrowTryCatchScope rethrow(block); 6022 V8RethrowTryCatchScope rethrow(block);
6011 TONATIVE_VOID_INTERNAL(elementArg, V8Element::toNativeWithTypeCheck(info .GetIsolate(), info[0])); 6023 TONATIVE_VOID_INTERNAL(elementArg, V8Element::toNativeWithTypeCheck(info .GetIsolate(), info[0]));
6012 } 6024 }
6013 impl->voidMethodElementArg(elementArg); 6025 impl->voidMethodElementArg(elementArg);
6014 } 6026 }
6015 6027
6016 static void voidMethodElementArgMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info) 6028 static void voidMethodElementArgMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info)
6017 { 6029 {
6018 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 6030 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
6019 TestObjectV8Internal::voidMethodElementArgMethod(info); 6031 TestObjectV8Internal::voidMethodElementArgMethod(info);
6020 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 6032 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
6021 } 6033 }
6022 6034
6023 static void voidMethodNodeArgMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo) 6035 static void voidMethodNodeArgMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
6024 { 6036 {
6025 if (UNLIKELY(info.Length() < 1)) { 6037 if (UNLIKELY(info.Length() < 1)) {
6026 throwMinimumArityTypeErrorForMethod("voidMethodNodeArg", "TestObject", 1 , info.Length(), info.GetIsolate()); 6038 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v oidMethodNodeArg", "TestObject", 1, info.Length(), info.GetIsolate()), info.GetI solate());
6027 return; 6039 return;
6028 } 6040 }
6029 TestObject* impl = V8TestObject::toNative(info.Holder()); 6041 TestObject* impl = V8TestObject::toNative(info.Holder());
6030 Node* nodeArg; 6042 Node* nodeArg;
6031 { 6043 {
6032 v8::TryCatch block; 6044 v8::TryCatch block;
6033 V8RethrowTryCatchScope rethrow(block); 6045 V8RethrowTryCatchScope rethrow(block);
6034 TONATIVE_VOID_INTERNAL(nodeArg, V8Node::toNativeWithTypeCheck(info.GetIs olate(), info[0])); 6046 TONATIVE_VOID_INTERNAL(nodeArg, V8Node::toNativeWithTypeCheck(info.GetIs olate(), info[0]));
6035 } 6047 }
6036 impl->voidMethodNodeArg(nodeArg); 6048 impl->voidMethodNodeArg(nodeArg);
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
6104 static void uint8ArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va lue>& info) 6116 static void uint8ArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va lue>& info)
6105 { 6117 {
6106 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 6118 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
6107 TestObjectV8Internal::uint8ArrayMethodMethod(info); 6119 TestObjectV8Internal::uint8ArrayMethodMethod(info);
6108 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 6120 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
6109 } 6121 }
6110 6122
6111 static void voidMethodArrayBufferArgMethod(const v8::FunctionCallbackInfo<v8::Va lue>& info) 6123 static void voidMethodArrayBufferArgMethod(const v8::FunctionCallbackInfo<v8::Va lue>& info)
6112 { 6124 {
6113 if (UNLIKELY(info.Length() < 1)) { 6125 if (UNLIKELY(info.Length() < 1)) {
6114 throwMinimumArityTypeErrorForMethod("voidMethodArrayBufferArg", "TestObj ect", 1, info.Length(), info.GetIsolate()); 6126 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v oidMethodArrayBufferArg", "TestObject", 1, info.Length(), info.GetIsolate()), in fo.GetIsolate());
6115 return; 6127 return;
6116 } 6128 }
6117 TestObject* impl = V8TestObject::toNative(info.Holder()); 6129 TestObject* impl = V8TestObject::toNative(info.Holder());
6118 ArrayBuffer* arrayBufferArg; 6130 ArrayBuffer* arrayBufferArg;
6119 { 6131 {
6120 v8::TryCatch block; 6132 v8::TryCatch block;
6121 V8RethrowTryCatchScope rethrow(block); 6133 V8RethrowTryCatchScope rethrow(block);
6122 TONATIVE_VOID_INTERNAL(arrayBufferArg, info[0]->IsArrayBuffer() ? V8Arra yBuffer::toNative(v8::Handle<v8::ArrayBuffer>::Cast(info[0])) : 0); 6134 TONATIVE_VOID_INTERNAL(arrayBufferArg, info[0]->IsArrayBuffer() ? V8Arra yBuffer::toNative(v8::Handle<v8::ArrayBuffer>::Cast(info[0])) : 0);
6123 } 6135 }
6124 impl->voidMethodArrayBufferArg(arrayBufferArg); 6136 impl->voidMethodArrayBufferArg(arrayBufferArg);
6125 } 6137 }
6126 6138
6127 static void voidMethodArrayBufferArgMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& info) 6139 static void voidMethodArrayBufferArgMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& info)
6128 { 6140 {
6129 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 6141 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
6130 TestObjectV8Internal::voidMethodArrayBufferArgMethod(info); 6142 TestObjectV8Internal::voidMethodArrayBufferArgMethod(info);
6131 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 6143 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
6132 } 6144 }
6133 6145
6134 static void voidMethodArrayBufferOrNullArgMethod(const v8::FunctionCallbackInfo< v8::Value>& info) 6146 static void voidMethodArrayBufferOrNullArgMethod(const v8::FunctionCallbackInfo< v8::Value>& info)
6135 { 6147 {
6136 if (UNLIKELY(info.Length() < 1)) { 6148 if (UNLIKELY(info.Length() < 1)) {
6137 throwMinimumArityTypeErrorForMethod("voidMethodArrayBufferOrNullArg", "T estObject", 1, info.Length(), info.GetIsolate()); 6149 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v oidMethodArrayBufferOrNullArg", "TestObject", 1, info.Length(), info.GetIsolate( )), info.GetIsolate());
6138 return; 6150 return;
6139 } 6151 }
6140 TestObject* impl = V8TestObject::toNative(info.Holder()); 6152 TestObject* impl = V8TestObject::toNative(info.Holder());
6141 ArrayBuffer* arrayBufferArg; 6153 ArrayBuffer* arrayBufferArg;
6142 { 6154 {
6143 v8::TryCatch block; 6155 v8::TryCatch block;
6144 V8RethrowTryCatchScope rethrow(block); 6156 V8RethrowTryCatchScope rethrow(block);
6145 TONATIVE_VOID_INTERNAL(arrayBufferArg, info[0]->IsArrayBuffer() ? V8Arra yBuffer::toNative(v8::Handle<v8::ArrayBuffer>::Cast(info[0])) : 0); 6157 TONATIVE_VOID_INTERNAL(arrayBufferArg, info[0]->IsArrayBuffer() ? V8Arra yBuffer::toNative(v8::Handle<v8::ArrayBuffer>::Cast(info[0])) : 0);
6146 } 6158 }
6147 impl->voidMethodArrayBufferOrNullArg(arrayBufferArg); 6159 impl->voidMethodArrayBufferOrNullArg(arrayBufferArg);
6148 } 6160 }
6149 6161
6150 static void voidMethodArrayBufferOrNullArgMethodCallback(const v8::FunctionCallb ackInfo<v8::Value>& info) 6162 static void voidMethodArrayBufferOrNullArgMethodCallback(const v8::FunctionCallb ackInfo<v8::Value>& info)
6151 { 6163 {
6152 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 6164 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
6153 TestObjectV8Internal::voidMethodArrayBufferOrNullArgMethod(info); 6165 TestObjectV8Internal::voidMethodArrayBufferOrNullArgMethod(info);
6154 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 6166 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
6155 } 6167 }
6156 6168
6157 static void voidMethodArrayBufferViewArgMethod(const v8::FunctionCallbackInfo<v8 ::Value>& info) 6169 static void voidMethodArrayBufferViewArgMethod(const v8::FunctionCallbackInfo<v8 ::Value>& info)
6158 { 6170 {
6159 if (UNLIKELY(info.Length() < 1)) { 6171 if (UNLIKELY(info.Length() < 1)) {
6160 throwMinimumArityTypeErrorForMethod("voidMethodArrayBufferViewArg", "Tes tObject", 1, info.Length(), info.GetIsolate()); 6172 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v oidMethodArrayBufferViewArg", "TestObject", 1, info.Length(), info.GetIsolate()) , info.GetIsolate());
6161 return; 6173 return;
6162 } 6174 }
6163 TestObject* impl = V8TestObject::toNative(info.Holder()); 6175 TestObject* impl = V8TestObject::toNative(info.Holder());
6164 ArrayBufferView* arrayBufferViewArg; 6176 ArrayBufferView* arrayBufferViewArg;
6165 { 6177 {
6166 v8::TryCatch block; 6178 v8::TryCatch block;
6167 V8RethrowTryCatchScope rethrow(block); 6179 V8RethrowTryCatchScope rethrow(block);
6168 TONATIVE_VOID_INTERNAL(arrayBufferViewArg, info[0]->IsArrayBufferView() ? V8ArrayBufferView::toNative(v8::Handle<v8::ArrayBufferView>::Cast(info[0])) : 0); 6180 TONATIVE_VOID_INTERNAL(arrayBufferViewArg, info[0]->IsArrayBufferView() ? V8ArrayBufferView::toNative(v8::Handle<v8::ArrayBufferView>::Cast(info[0])) : 0);
6169 } 6181 }
6170 impl->voidMethodArrayBufferViewArg(arrayBufferViewArg); 6182 impl->voidMethodArrayBufferViewArg(arrayBufferViewArg);
6171 } 6183 }
6172 6184
6173 static void voidMethodArrayBufferViewArgMethodCallback(const v8::FunctionCallbac kInfo<v8::Value>& info) 6185 static void voidMethodArrayBufferViewArgMethodCallback(const v8::FunctionCallbac kInfo<v8::Value>& info)
6174 { 6186 {
6175 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 6187 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
6176 TestObjectV8Internal::voidMethodArrayBufferViewArgMethod(info); 6188 TestObjectV8Internal::voidMethodArrayBufferViewArgMethod(info);
6177 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 6189 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
6178 } 6190 }
6179 6191
6180 static void voidMethodFloat32ArrayArgMethod(const v8::FunctionCallbackInfo<v8::V alue>& info) 6192 static void voidMethodFloat32ArrayArgMethod(const v8::FunctionCallbackInfo<v8::V alue>& info)
6181 { 6193 {
6182 if (UNLIKELY(info.Length() < 1)) { 6194 if (UNLIKELY(info.Length() < 1)) {
6183 throwMinimumArityTypeErrorForMethod("voidMethodFloat32ArrayArg", "TestOb ject", 1, info.Length(), info.GetIsolate()); 6195 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v oidMethodFloat32ArrayArg", "TestObject", 1, info.Length(), info.GetIsolate()), i nfo.GetIsolate());
6184 return; 6196 return;
6185 } 6197 }
6186 TestObject* impl = V8TestObject::toNative(info.Holder()); 6198 TestObject* impl = V8TestObject::toNative(info.Holder());
6187 Float32Array* float32ArrayArg; 6199 Float32Array* float32ArrayArg;
6188 { 6200 {
6189 v8::TryCatch block; 6201 v8::TryCatch block;
6190 V8RethrowTryCatchScope rethrow(block); 6202 V8RethrowTryCatchScope rethrow(block);
6191 TONATIVE_VOID_INTERNAL(float32ArrayArg, info[0]->IsFloat32Array() ? V8Fl oat32Array::toNative(v8::Handle<v8::Float32Array>::Cast(info[0])) : 0); 6203 TONATIVE_VOID_INTERNAL(float32ArrayArg, info[0]->IsFloat32Array() ? V8Fl oat32Array::toNative(v8::Handle<v8::Float32Array>::Cast(info[0])) : 0);
6192 } 6204 }
6193 impl->voidMethodFloat32ArrayArg(float32ArrayArg); 6205 impl->voidMethodFloat32ArrayArg(float32ArrayArg);
6194 } 6206 }
6195 6207
6196 static void voidMethodFloat32ArrayArgMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info) 6208 static void voidMethodFloat32ArrayArgMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info)
6197 { 6209 {
6198 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 6210 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
6199 TestObjectV8Internal::voidMethodFloat32ArrayArgMethod(info); 6211 TestObjectV8Internal::voidMethodFloat32ArrayArgMethod(info);
6200 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 6212 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
6201 } 6213 }
6202 6214
6203 static void voidMethodInt32ArrayArgMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info) 6215 static void voidMethodInt32ArrayArgMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info)
6204 { 6216 {
6205 if (UNLIKELY(info.Length() < 1)) { 6217 if (UNLIKELY(info.Length() < 1)) {
6206 throwMinimumArityTypeErrorForMethod("voidMethodInt32ArrayArg", "TestObje ct", 1, info.Length(), info.GetIsolate()); 6218 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v oidMethodInt32ArrayArg", "TestObject", 1, info.Length(), info.GetIsolate()), inf o.GetIsolate());
6207 return; 6219 return;
6208 } 6220 }
6209 TestObject* impl = V8TestObject::toNative(info.Holder()); 6221 TestObject* impl = V8TestObject::toNative(info.Holder());
6210 Int32Array* int32ArrayArg; 6222 Int32Array* int32ArrayArg;
6211 { 6223 {
6212 v8::TryCatch block; 6224 v8::TryCatch block;
6213 V8RethrowTryCatchScope rethrow(block); 6225 V8RethrowTryCatchScope rethrow(block);
6214 TONATIVE_VOID_INTERNAL(int32ArrayArg, info[0]->IsInt32Array() ? V8Int32A rray::toNative(v8::Handle<v8::Int32Array>::Cast(info[0])) : 0); 6226 TONATIVE_VOID_INTERNAL(int32ArrayArg, info[0]->IsInt32Array() ? V8Int32A rray::toNative(v8::Handle<v8::Int32Array>::Cast(info[0])) : 0);
6215 } 6227 }
6216 impl->voidMethodInt32ArrayArg(int32ArrayArg); 6228 impl->voidMethodInt32ArrayArg(int32ArrayArg);
6217 } 6229 }
6218 6230
6219 static void voidMethodInt32ArrayArgMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info) 6231 static void voidMethodInt32ArrayArgMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info)
6220 { 6232 {
6221 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 6233 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
6222 TestObjectV8Internal::voidMethodInt32ArrayArgMethod(info); 6234 TestObjectV8Internal::voidMethodInt32ArrayArgMethod(info);
6223 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 6235 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
6224 } 6236 }
6225 6237
6226 static void voidMethodUint8ArrayArgMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info) 6238 static void voidMethodUint8ArrayArgMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info)
6227 { 6239 {
6228 if (UNLIKELY(info.Length() < 1)) { 6240 if (UNLIKELY(info.Length() < 1)) {
6229 throwMinimumArityTypeErrorForMethod("voidMethodUint8ArrayArg", "TestObje ct", 1, info.Length(), info.GetIsolate()); 6241 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v oidMethodUint8ArrayArg", "TestObject", 1, info.Length(), info.GetIsolate()), inf o.GetIsolate());
6230 return; 6242 return;
6231 } 6243 }
6232 TestObject* impl = V8TestObject::toNative(info.Holder()); 6244 TestObject* impl = V8TestObject::toNative(info.Holder());
6233 Uint8Array* uint8ArrayArg; 6245 Uint8Array* uint8ArrayArg;
6234 { 6246 {
6235 v8::TryCatch block; 6247 v8::TryCatch block;
6236 V8RethrowTryCatchScope rethrow(block); 6248 V8RethrowTryCatchScope rethrow(block);
6237 TONATIVE_VOID_INTERNAL(uint8ArrayArg, info[0]->IsUint8Array() ? V8Uint8A rray::toNative(v8::Handle<v8::Uint8Array>::Cast(info[0])) : 0); 6249 TONATIVE_VOID_INTERNAL(uint8ArrayArg, info[0]->IsUint8Array() ? V8Uint8A rray::toNative(v8::Handle<v8::Uint8Array>::Cast(info[0])) : 0);
6238 } 6250 }
6239 impl->voidMethodUint8ArrayArg(uint8ArrayArg); 6251 impl->voidMethodUint8ArrayArg(uint8ArrayArg);
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
6281 static void testInterfaceEmptyArrayMethodMethodCallback(const v8::FunctionCallba ckInfo<v8::Value>& info) 6293 static void testInterfaceEmptyArrayMethodMethodCallback(const v8::FunctionCallba ckInfo<v8::Value>& info)
6282 { 6294 {
6283 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 6295 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
6284 TestObjectV8Internal::testInterfaceEmptyArrayMethodMethod(info); 6296 TestObjectV8Internal::testInterfaceEmptyArrayMethodMethod(info);
6285 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 6297 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
6286 } 6298 }
6287 6299
6288 static void voidMethodArrayLongArgMethod(const v8::FunctionCallbackInfo<v8::Valu e>& info) 6300 static void voidMethodArrayLongArgMethod(const v8::FunctionCallbackInfo<v8::Valu e>& info)
6289 { 6301 {
6290 if (UNLIKELY(info.Length() < 1)) { 6302 if (UNLIKELY(info.Length() < 1)) {
6291 throwMinimumArityTypeErrorForMethod("voidMethodArrayLongArg", "TestObjec t", 1, info.Length(), info.GetIsolate()); 6303 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v oidMethodArrayLongArg", "TestObject", 1, info.Length(), info.GetIsolate()), info .GetIsolate());
6292 return; 6304 return;
6293 } 6305 }
6294 TestObject* impl = V8TestObject::toNative(info.Holder()); 6306 TestObject* impl = V8TestObject::toNative(info.Holder());
6295 Vector<int> arrayLongArg; 6307 Vector<int> arrayLongArg;
6296 { 6308 {
6297 v8::TryCatch block; 6309 v8::TryCatch block;
6298 V8RethrowTryCatchScope rethrow(block); 6310 V8RethrowTryCatchScope rethrow(block);
6299 TONATIVE_VOID_INTERNAL(arrayLongArg, toNativeArray<int>(info[0], 1, info .GetIsolate())); 6311 TONATIVE_VOID_INTERNAL(arrayLongArg, toNativeArray<int>(info[0], 1, info .GetIsolate()));
6300 } 6312 }
6301 impl->voidMethodArrayLongArg(arrayLongArg); 6313 impl->voidMethodArrayLongArg(arrayLongArg);
6302 } 6314 }
6303 6315
6304 static void voidMethodArrayLongArgMethodCallback(const v8::FunctionCallbackInfo< v8::Value>& info) 6316 static void voidMethodArrayLongArgMethodCallback(const v8::FunctionCallbackInfo< v8::Value>& info)
6305 { 6317 {
6306 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 6318 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
6307 TestObjectV8Internal::voidMethodArrayLongArgMethod(info); 6319 TestObjectV8Internal::voidMethodArrayLongArgMethod(info);
6308 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 6320 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
6309 } 6321 }
6310 6322
6311 static void voidMethodArrayStringArgMethod(const v8::FunctionCallbackInfo<v8::Va lue>& info) 6323 static void voidMethodArrayStringArgMethod(const v8::FunctionCallbackInfo<v8::Va lue>& info)
6312 { 6324 {
6313 if (UNLIKELY(info.Length() < 1)) { 6325 if (UNLIKELY(info.Length() < 1)) {
6314 throwMinimumArityTypeErrorForMethod("voidMethodArrayStringArg", "TestObj ect", 1, info.Length(), info.GetIsolate()); 6326 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v oidMethodArrayStringArg", "TestObject", 1, info.Length(), info.GetIsolate()), in fo.GetIsolate());
6315 return; 6327 return;
6316 } 6328 }
6317 TestObject* impl = V8TestObject::toNative(info.Holder()); 6329 TestObject* impl = V8TestObject::toNative(info.Holder());
6318 Vector<String> arrayStringArg; 6330 Vector<String> arrayStringArg;
6319 { 6331 {
6320 v8::TryCatch block; 6332 v8::TryCatch block;
6321 V8RethrowTryCatchScope rethrow(block); 6333 V8RethrowTryCatchScope rethrow(block);
6322 TONATIVE_VOID_INTERNAL(arrayStringArg, toNativeArray<String>(info[0], 1, info.GetIsolate())); 6334 TONATIVE_VOID_INTERNAL(arrayStringArg, toNativeArray<String>(info[0], 1, info.GetIsolate()));
6323 } 6335 }
6324 impl->voidMethodArrayStringArg(arrayStringArg); 6336 impl->voidMethodArrayStringArg(arrayStringArg);
6325 } 6337 }
6326 6338
6327 static void voidMethodArrayStringArgMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& info) 6339 static void voidMethodArrayStringArgMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& info)
6328 { 6340 {
6329 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 6341 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
6330 TestObjectV8Internal::voidMethodArrayStringArgMethod(info); 6342 TestObjectV8Internal::voidMethodArrayStringArgMethod(info);
6331 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 6343 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
6332 } 6344 }
6333 6345
6334 static void voidMethodArrayTestInterfaceEmptyArgMethod(const v8::FunctionCallbac kInfo<v8::Value>& info) 6346 static void voidMethodArrayTestInterfaceEmptyArgMethod(const v8::FunctionCallbac kInfo<v8::Value>& info)
6335 { 6347 {
6336 if (UNLIKELY(info.Length() < 1)) { 6348 if (UNLIKELY(info.Length() < 1)) {
6337 throwMinimumArityTypeErrorForMethod("voidMethodArrayTestInterfaceEmptyAr g", "TestObject", 1, info.Length(), info.GetIsolate()); 6349 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v oidMethodArrayTestInterfaceEmptyArg", "TestObject", 1, info.Length(), info.GetIs olate()), info.GetIsolate());
6338 return; 6350 return;
6339 } 6351 }
6340 TestObject* impl = V8TestObject::toNative(info.Holder()); 6352 TestObject* impl = V8TestObject::toNative(info.Holder());
6341 Vector<RefPtr<TestInterfaceEmpty> > arrayTestInterfaceEmptyArg; 6353 Vector<RefPtr<TestInterfaceEmpty> > arrayTestInterfaceEmptyArg;
6342 { 6354 {
6343 v8::TryCatch block; 6355 v8::TryCatch block;
6344 V8RethrowTryCatchScope rethrow(block); 6356 V8RethrowTryCatchScope rethrow(block);
6345 TONATIVE_VOID_INTERNAL(arrayTestInterfaceEmptyArg, (toRefPtrNativeArray< TestInterfaceEmpty, V8TestInterfaceEmpty>(info[0], 1, info.GetIsolate()))); 6357 TONATIVE_VOID_INTERNAL(arrayTestInterfaceEmptyArg, (toRefPtrNativeArray< TestInterfaceEmpty, V8TestInterfaceEmpty>(info[0], 1, info.GetIsolate())));
6346 } 6358 }
6347 impl->voidMethodArrayTestInterfaceEmptyArg(arrayTestInterfaceEmptyArg); 6359 impl->voidMethodArrayTestInterfaceEmptyArg(arrayTestInterfaceEmptyArg);
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
6389 static void testInterfaceEmptySequenceMethodMethodCallback(const v8::FunctionCal lbackInfo<v8::Value>& info) 6401 static void testInterfaceEmptySequenceMethodMethodCallback(const v8::FunctionCal lbackInfo<v8::Value>& info)
6390 { 6402 {
6391 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 6403 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
6392 TestObjectV8Internal::testInterfaceEmptySequenceMethodMethod(info); 6404 TestObjectV8Internal::testInterfaceEmptySequenceMethodMethod(info);
6393 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 6405 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
6394 } 6406 }
6395 6407
6396 static void voidMethodSequenceLongArgMethod(const v8::FunctionCallbackInfo<v8::V alue>& info) 6408 static void voidMethodSequenceLongArgMethod(const v8::FunctionCallbackInfo<v8::V alue>& info)
6397 { 6409 {
6398 if (UNLIKELY(info.Length() < 1)) { 6410 if (UNLIKELY(info.Length() < 1)) {
6399 throwMinimumArityTypeErrorForMethod("voidMethodSequenceLongArg", "TestOb ject", 1, info.Length(), info.GetIsolate()); 6411 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v oidMethodSequenceLongArg", "TestObject", 1, info.Length(), info.GetIsolate()), i nfo.GetIsolate());
6400 return; 6412 return;
6401 } 6413 }
6402 TestObject* impl = V8TestObject::toNative(info.Holder()); 6414 TestObject* impl = V8TestObject::toNative(info.Holder());
6403 Vector<int> longSequenceArg; 6415 Vector<int> longSequenceArg;
6404 { 6416 {
6405 v8::TryCatch block; 6417 v8::TryCatch block;
6406 V8RethrowTryCatchScope rethrow(block); 6418 V8RethrowTryCatchScope rethrow(block);
6407 TONATIVE_VOID_INTERNAL(longSequenceArg, toNativeArray<int>(info[0], 1, i nfo.GetIsolate())); 6419 TONATIVE_VOID_INTERNAL(longSequenceArg, toNativeArray<int>(info[0], 1, i nfo.GetIsolate()));
6408 } 6420 }
6409 impl->voidMethodSequenceLongArg(longSequenceArg); 6421 impl->voidMethodSequenceLongArg(longSequenceArg);
6410 } 6422 }
6411 6423
6412 static void voidMethodSequenceLongArgMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info) 6424 static void voidMethodSequenceLongArgMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info)
6413 { 6425 {
6414 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 6426 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
6415 TestObjectV8Internal::voidMethodSequenceLongArgMethod(info); 6427 TestObjectV8Internal::voidMethodSequenceLongArgMethod(info);
6416 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 6428 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
6417 } 6429 }
6418 6430
6419 static void voidMethodSequenceStringArgMethod(const v8::FunctionCallbackInfo<v8: :Value>& info) 6431 static void voidMethodSequenceStringArgMethod(const v8::FunctionCallbackInfo<v8: :Value>& info)
6420 { 6432 {
6421 if (UNLIKELY(info.Length() < 1)) { 6433 if (UNLIKELY(info.Length() < 1)) {
6422 throwMinimumArityTypeErrorForMethod("voidMethodSequenceStringArg", "Test Object", 1, info.Length(), info.GetIsolate()); 6434 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v oidMethodSequenceStringArg", "TestObject", 1, info.Length(), info.GetIsolate()), info.GetIsolate());
6423 return; 6435 return;
6424 } 6436 }
6425 TestObject* impl = V8TestObject::toNative(info.Holder()); 6437 TestObject* impl = V8TestObject::toNative(info.Holder());
6426 Vector<String> stringSequenceArg; 6438 Vector<String> stringSequenceArg;
6427 { 6439 {
6428 v8::TryCatch block; 6440 v8::TryCatch block;
6429 V8RethrowTryCatchScope rethrow(block); 6441 V8RethrowTryCatchScope rethrow(block);
6430 TONATIVE_VOID_INTERNAL(stringSequenceArg, toNativeArray<String>(info[0], 1, info.GetIsolate())); 6442 TONATIVE_VOID_INTERNAL(stringSequenceArg, toNativeArray<String>(info[0], 1, info.GetIsolate()));
6431 } 6443 }
6432 impl->voidMethodSequenceStringArg(stringSequenceArg); 6444 impl->voidMethodSequenceStringArg(stringSequenceArg);
6433 } 6445 }
6434 6446
6435 static void voidMethodSequenceStringArgMethodCallback(const v8::FunctionCallback Info<v8::Value>& info) 6447 static void voidMethodSequenceStringArgMethodCallback(const v8::FunctionCallback Info<v8::Value>& info)
6436 { 6448 {
6437 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 6449 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
6438 TestObjectV8Internal::voidMethodSequenceStringArgMethod(info); 6450 TestObjectV8Internal::voidMethodSequenceStringArgMethod(info);
6439 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 6451 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
6440 } 6452 }
6441 6453
6442 static void voidMethodSequenceTestInterfaceEmptyArgMethod(const v8::FunctionCall backInfo<v8::Value>& info) 6454 static void voidMethodSequenceTestInterfaceEmptyArgMethod(const v8::FunctionCall backInfo<v8::Value>& info)
6443 { 6455 {
6444 if (UNLIKELY(info.Length() < 1)) { 6456 if (UNLIKELY(info.Length() < 1)) {
6445 throwMinimumArityTypeErrorForMethod("voidMethodSequenceTestInterfaceEmpt yArg", "TestObject", 1, info.Length(), info.GetIsolate()); 6457 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v oidMethodSequenceTestInterfaceEmptyArg", "TestObject", 1, info.Length(), info.Ge tIsolate()), info.GetIsolate());
6446 return; 6458 return;
6447 } 6459 }
6448 TestObject* impl = V8TestObject::toNative(info.Holder()); 6460 TestObject* impl = V8TestObject::toNative(info.Holder());
6449 Vector<RefPtr<TestInterfaceEmpty> > testInterfaceEmptySequenceArg; 6461 Vector<RefPtr<TestInterfaceEmpty> > testInterfaceEmptySequenceArg;
6450 { 6462 {
6451 v8::TryCatch block; 6463 v8::TryCatch block;
6452 V8RethrowTryCatchScope rethrow(block); 6464 V8RethrowTryCatchScope rethrow(block);
6453 TONATIVE_VOID_INTERNAL(testInterfaceEmptySequenceArg, (toRefPtrNativeArr ay<TestInterfaceEmpty, V8TestInterfaceEmpty>(info[0], 1, info.GetIsolate()))); 6465 TONATIVE_VOID_INTERNAL(testInterfaceEmptySequenceArg, (toRefPtrNativeArr ay<TestInterfaceEmpty, V8TestInterfaceEmpty>(info[0], 1, info.GetIsolate())));
6454 } 6466 }
6455 impl->voidMethodSequenceTestInterfaceEmptyArg(testInterfaceEmptySequenceArg) ; 6467 impl->voidMethodSequenceTestInterfaceEmptyArg(testInterfaceEmptySequenceArg) ;
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
6518 static void nullableLongSequenceMethodMethodCallback(const v8::FunctionCallbackI nfo<v8::Value>& info) 6530 static void nullableLongSequenceMethodMethodCallback(const v8::FunctionCallbackI nfo<v8::Value>& info)
6519 { 6531 {
6520 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 6532 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
6521 TestObjectV8Internal::nullableLongSequenceMethodMethod(info); 6533 TestObjectV8Internal::nullableLongSequenceMethodMethod(info);
6522 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 6534 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
6523 } 6535 }
6524 6536
6525 static void voidMethodTestInterfaceEmptyOrNullArgMethod(const v8::FunctionCallba ckInfo<v8::Value>& info) 6537 static void voidMethodTestInterfaceEmptyOrNullArgMethod(const v8::FunctionCallba ckInfo<v8::Value>& info)
6526 { 6538 {
6527 if (UNLIKELY(info.Length() < 1)) { 6539 if (UNLIKELY(info.Length() < 1)) {
6528 throwMinimumArityTypeErrorForMethod("voidMethodTestInterfaceEmptyOrNullA rg", "TestObject", 1, info.Length(), info.GetIsolate()); 6540 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v oidMethodTestInterfaceEmptyOrNullArg", "TestObject", 1, info.Length(), info.GetI solate()), info.GetIsolate());
6529 return; 6541 return;
6530 } 6542 }
6531 TestObject* impl = V8TestObject::toNative(info.Holder()); 6543 TestObject* impl = V8TestObject::toNative(info.Holder());
6532 TestInterfaceEmpty* nullableTestInterfaceEmptyArg; 6544 TestInterfaceEmpty* nullableTestInterfaceEmptyArg;
6533 { 6545 {
6534 v8::TryCatch block; 6546 v8::TryCatch block;
6535 V8RethrowTryCatchScope rethrow(block); 6547 V8RethrowTryCatchScope rethrow(block);
6536 TONATIVE_VOID_INTERNAL(nullableTestInterfaceEmptyArg, V8TestInterfaceEmp ty::toNativeWithTypeCheck(info.GetIsolate(), info[0])); 6548 TONATIVE_VOID_INTERNAL(nullableTestInterfaceEmptyArg, V8TestInterfaceEmp ty::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
6537 } 6549 }
6538 impl->voidMethodTestInterfaceEmptyOrNullArg(nullableTestInterfaceEmptyArg); 6550 impl->voidMethodTestInterfaceEmptyOrNullArg(nullableTestInterfaceEmptyArg);
6539 } 6551 }
6540 6552
6541 static void voidMethodTestInterfaceEmptyOrNullArgMethodCallback(const v8::Functi onCallbackInfo<v8::Value>& info) 6553 static void voidMethodTestInterfaceEmptyOrNullArgMethodCallback(const v8::Functi onCallbackInfo<v8::Value>& info)
6542 { 6554 {
6543 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 6555 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
6544 TestObjectV8Internal::voidMethodTestInterfaceEmptyOrNullArgMethod(info); 6556 TestObjectV8Internal::voidMethodTestInterfaceEmptyOrNullArgMethod(info);
6545 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 6557 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
6546 } 6558 }
6547 6559
6548 static void voidMethodTestCallbackInterfaceArgMethod(const v8::FunctionCallbackI nfo<v8::Value>& info) 6560 static void voidMethodTestCallbackInterfaceArgMethod(const v8::FunctionCallbackI nfo<v8::Value>& info)
6549 { 6561 {
6550 if (UNLIKELY(info.Length() < 1)) { 6562 if (UNLIKELY(info.Length() < 1)) {
6551 throwMinimumArityTypeErrorForMethod("voidMethodTestCallbackInterfaceArg" , "TestObject", 1, info.Length(), info.GetIsolate()); 6563 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v oidMethodTestCallbackInterfaceArg", "TestObject", 1, info.Length(), info.GetIsol ate()), info.GetIsolate());
6552 return; 6564 return;
6553 } 6565 }
6554 TestObject* impl = V8TestObject::toNative(info.Holder()); 6566 TestObject* impl = V8TestObject::toNative(info.Holder());
6555 OwnPtr<TestCallbackInterface> testCallbackInterfaceArg; 6567 OwnPtr<TestCallbackInterface> testCallbackInterfaceArg;
6556 { 6568 {
6557 if (info.Length() <= 0 || !info[0]->IsFunction()) { 6569 if (info.Length() <= 0 || !info[0]->IsFunction()) {
6558 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute( "voidMethodTestCallbackInterfaceArg", "TestObject", "The callback provided as pa rameter 1 is not a function."), info.GetIsolate()); 6570 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute( "voidMethodTestCallbackInterfaceArg", "TestObject", "The callback provided as pa rameter 1 is not a function."), info.GetIsolate());
6559 return; 6571 return;
6560 } 6572 }
6561 testCallbackInterfaceArg = V8TestCallbackInterface::create(v8::Handle<v8 ::Function>::Cast(info[0]), ScriptState::current(info.GetIsolate())); 6573 testCallbackInterfaceArg = V8TestCallbackInterface::create(v8::Handle<v8 ::Function>::Cast(info[0]), ScriptState::current(info.GetIsolate()));
(...skipping 27 matching lines...) Expand all
6589 static void voidMethodOptionalTestCallbackInterfaceArgMethodCallback(const v8::F unctionCallbackInfo<v8::Value>& info) 6601 static void voidMethodOptionalTestCallbackInterfaceArgMethodCallback(const v8::F unctionCallbackInfo<v8::Value>& info)
6590 { 6602 {
6591 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 6603 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
6592 TestObjectV8Internal::voidMethodOptionalTestCallbackInterfaceArgMethod(info) ; 6604 TestObjectV8Internal::voidMethodOptionalTestCallbackInterfaceArgMethod(info) ;
6593 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 6605 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
6594 } 6606 }
6595 6607
6596 static void voidMethodTestCallbackInterfaceOrNullArgMethod(const v8::FunctionCal lbackInfo<v8::Value>& info) 6608 static void voidMethodTestCallbackInterfaceOrNullArgMethod(const v8::FunctionCal lbackInfo<v8::Value>& info)
6597 { 6609 {
6598 if (UNLIKELY(info.Length() < 1)) { 6610 if (UNLIKELY(info.Length() < 1)) {
6599 throwMinimumArityTypeErrorForMethod("voidMethodTestCallbackInterfaceOrNu llArg", "TestObject", 1, info.Length(), info.GetIsolate()); 6611 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v oidMethodTestCallbackInterfaceOrNullArg", "TestObject", 1, info.Length(), info.G etIsolate()), info.GetIsolate());
6600 return; 6612 return;
6601 } 6613 }
6602 TestObject* impl = V8TestObject::toNative(info.Holder()); 6614 TestObject* impl = V8TestObject::toNative(info.Holder());
6603 OwnPtr<TestCallbackInterface> testCallbackInterfaceArg; 6615 OwnPtr<TestCallbackInterface> testCallbackInterfaceArg;
6604 { 6616 {
6605 if (info.Length() <= 0 || !(info[0]->IsFunction() || info[0]->IsNull())) { 6617 if (info.Length() <= 0 || !(info[0]->IsFunction() || info[0]->IsNull())) {
6606 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute( "voidMethodTestCallbackInterfaceOrNullArg", "TestObject", "The callback provided as parameter 1 is not a function."), info.GetIsolate()); 6618 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute( "voidMethodTestCallbackInterfaceOrNullArg", "TestObject", "The callback provided as parameter 1 is not a function."), info.GetIsolate());
6607 return; 6619 return;
6608 } 6620 }
6609 testCallbackInterfaceArg = info[0]->IsNull() ? nullptr : V8TestCallbackI nterface::create(v8::Handle<v8::Function>::Cast(info[0]), ScriptState::current(i nfo.GetIsolate())); 6621 testCallbackInterfaceArg = info[0]->IsNull() ? nullptr : V8TestCallbackI nterface::create(v8::Handle<v8::Function>::Cast(info[0]), ScriptState::current(i nfo.GetIsolate()));
(...skipping 17 matching lines...) Expand all
6627 static void testEnumMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Valu e>& info) 6639 static void testEnumMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Valu e>& info)
6628 { 6640 {
6629 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 6641 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
6630 TestObjectV8Internal::testEnumMethodMethod(info); 6642 TestObjectV8Internal::testEnumMethodMethod(info);
6631 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 6643 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
6632 } 6644 }
6633 6645
6634 static void voidMethodTestEnumArgMethod(const v8::FunctionCallbackInfo<v8::Value >& info) 6646 static void voidMethodTestEnumArgMethod(const v8::FunctionCallbackInfo<v8::Value >& info)
6635 { 6647 {
6636 if (UNLIKELY(info.Length() < 1)) { 6648 if (UNLIKELY(info.Length() < 1)) {
6637 throwMinimumArityTypeErrorForMethod("voidMethodTestEnumArg", "TestObject ", 1, info.Length(), info.GetIsolate()); 6649 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v oidMethodTestEnumArg", "TestObject", 1, info.Length(), info.GetIsolate()), info. GetIsolate());
6638 return; 6650 return;
6639 } 6651 }
6640 TestObject* impl = V8TestObject::toNative(info.Holder()); 6652 TestObject* impl = V8TestObject::toNative(info.Holder());
6641 V8StringResource<> testEnumTypeArg; 6653 V8StringResource<> testEnumTypeArg;
6642 { 6654 {
6643 v8::TryCatch block; 6655 v8::TryCatch block;
6644 V8RethrowTryCatchScope rethrow(block); 6656 V8RethrowTryCatchScope rethrow(block);
6645 TOSTRING_VOID_INTERNAL(testEnumTypeArg, info[0]); 6657 TOSTRING_VOID_INTERNAL(testEnumTypeArg, info[0]);
6646 String string = testEnumTypeArg; 6658 String string = testEnumTypeArg;
6647 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" | | string == "EnumValue3")) { 6659 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" | | string == "EnumValue3")) {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
6682 { 6694 {
6683 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 6695 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
6684 TestObjectV8Internal::nodeFilterMethodMethod(info); 6696 TestObjectV8Internal::nodeFilterMethodMethod(info);
6685 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 6697 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
6686 } 6698 }
6687 6699
6688 static void promiseMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 6700 static void promiseMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6689 { 6701 {
6690 ExceptionState exceptionState(ExceptionState::ExecutionContext, "promiseMeth od", "TestObject", info.Holder(), info.GetIsolate()); 6702 ExceptionState exceptionState(ExceptionState::ExecutionContext, "promiseMeth od", "TestObject", info.Holder(), info.GetIsolate());
6691 if (UNLIKELY(info.Length() < 3)) { 6703 if (UNLIKELY(info.Length() < 3)) {
6692 v8SetReturnValue(info, ScriptPromise::rejectWithMinimumArityTypeError(Sc riptState::current(info.GetIsolate()), exceptionState, 3, info.Length()).v8Value ()); 6704 setMinimumArityTypeError(exceptionState, 3, info.Length());
6705 v8SetReturnValue(info, exceptionState.reject(ScriptState::current(info.G etIsolate())).v8Value());
6693 return; 6706 return;
6694 } 6707 }
6695 TestObject* impl = V8TestObject::toNative(info.Holder()); 6708 TestObject* impl = V8TestObject::toNative(info.Holder());
6696 int arg1; 6709 int arg1;
6697 Dictionary arg2; 6710 Dictionary arg2;
6698 V8StringResource<> arg3; 6711 V8StringResource<> arg3;
6699 Vector<String> variadic; 6712 Vector<String> variadic;
6700 { 6713 {
6701 v8::TryCatch block; 6714 v8::TryCatch block;
6702 V8RethrowTryCatchScope rethrow(block); 6715 V8RethrowTryCatchScope rethrow(block);
(...skipping 13 matching lines...) Expand all
6716 static void promiseMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value >& info) 6729 static void promiseMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value >& info)
6717 { 6730 {
6718 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 6731 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
6719 TestObjectV8Internal::promiseMethodMethod(info); 6732 TestObjectV8Internal::promiseMethodMethod(info);
6720 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 6733 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
6721 } 6734 }
6722 6735
6723 static void promiseMethodWithoutExceptionStateMethod(const v8::FunctionCallbackI nfo<v8::Value>& info) 6736 static void promiseMethodWithoutExceptionStateMethod(const v8::FunctionCallbackI nfo<v8::Value>& info)
6724 { 6737 {
6725 if (UNLIKELY(info.Length() < 1)) { 6738 if (UNLIKELY(info.Length() < 1)) {
6726 v8SetReturnValue(info, ScriptPromise::rejectWithMinimumArityTypeErrorFor Method(ScriptState::current(info.GetIsolate()), "promiseMethodWithoutExceptionSt ate", "TestObject", 1, info.Length()).v8Value()); 6739 v8SetReturnValue(info, ScriptPromise::rejectRaw(info.GetIsolate(), creat eMinimumArityTypeErrorForMethod("promiseMethodWithoutExceptionState", "TestObjec t", 1, info.Length(), info.GetIsolate())));
6727 return; 6740 return;
6728 } 6741 }
6729 TestObject* impl = V8TestObject::toNative(info.Holder()); 6742 TestObject* impl = V8TestObject::toNative(info.Holder());
6730 Dictionary arg1; 6743 Dictionary arg1;
6731 { 6744 {
6732 v8::TryCatch block; 6745 v8::TryCatch block;
6733 V8RethrowTryCatchScope rethrow(block); 6746 V8RethrowTryCatchScope rethrow(block);
6734 TONATIVE_VOID_PROMISE_INTERNAL(arg1, Dictionary(info[0], info.GetIsolate ()), info); 6747 TONATIVE_VOID_PROMISE_INTERNAL(arg1, Dictionary(info[0], info.GetIsolate ()), info);
6735 if (!arg1.isUndefinedOrNull() && !arg1.isObject()) { 6748 if (!arg1.isUndefinedOrNull() && !arg1.isObject()) {
6736 v8SetReturnValue(info, ScriptPromise::rejectWithTypeError(ScriptStat e::current(info.GetIsolate()), ExceptionMessages::failedToExecute("promiseMethod WithoutExceptionState", "TestObject", "parameter 1 ('arg1') is not an object.")) .v8Value()); 6749 v8SetReturnValue(info, ScriptPromise::rejectRaw(info.GetIsolate(), V 8ThrowException::createTypeError(ExceptionMessages::failedToExecute("promiseMeth odWithoutExceptionState", "TestObject", "parameter 1 ('arg1') is not an object." ), info.GetIsolate())));
6737 return; 6750 return;
6738 } 6751 }
6739 } 6752 }
6740 v8SetReturnValue(info, impl->promiseMethodWithoutExceptionState(arg1).v8Valu e()); 6753 v8SetReturnValue(info, impl->promiseMethodWithoutExceptionState(arg1).v8Valu e());
6741 } 6754 }
6742 6755
6743 static void promiseMethodWithoutExceptionStateMethodCallback(const v8::FunctionC allbackInfo<v8::Value>& info) 6756 static void promiseMethodWithoutExceptionStateMethodCallback(const v8::FunctionC allbackInfo<v8::Value>& info)
6744 { 6757 {
6745 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 6758 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
6746 TestObjectV8Internal::promiseMethodWithoutExceptionStateMethod(info); 6759 TestObjectV8Internal::promiseMethodWithoutExceptionStateMethod(info);
(...skipping 22 matching lines...) Expand all
6769 static void xPathNSResolverMethodMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info) 6782 static void xPathNSResolverMethodMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info)
6770 { 6783 {
6771 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 6784 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
6772 TestObjectV8Internal::xPathNSResolverMethodMethod(info); 6785 TestObjectV8Internal::xPathNSResolverMethodMethod(info);
6773 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 6786 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
6774 } 6787 }
6775 6788
6776 static void voidMethodDictionaryArgMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info) 6789 static void voidMethodDictionaryArgMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info)
6777 { 6790 {
6778 if (UNLIKELY(info.Length() < 1)) { 6791 if (UNLIKELY(info.Length() < 1)) {
6779 throwMinimumArityTypeErrorForMethod("voidMethodDictionaryArg", "TestObje ct", 1, info.Length(), info.GetIsolate()); 6792 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v oidMethodDictionaryArg", "TestObject", 1, info.Length(), info.GetIsolate()), inf o.GetIsolate());
6780 return; 6793 return;
6781 } 6794 }
6782 TestObject* impl = V8TestObject::toNative(info.Holder()); 6795 TestObject* impl = V8TestObject::toNative(info.Holder());
6783 Dictionary dictionaryArg; 6796 Dictionary dictionaryArg;
6784 { 6797 {
6785 v8::TryCatch block; 6798 v8::TryCatch block;
6786 V8RethrowTryCatchScope rethrow(block); 6799 V8RethrowTryCatchScope rethrow(block);
6787 TONATIVE_VOID_INTERNAL(dictionaryArg, Dictionary(info[0], info.GetIsolat e())); 6800 TONATIVE_VOID_INTERNAL(dictionaryArg, Dictionary(info[0], info.GetIsolat e()));
6788 if (!dictionaryArg.isUndefinedOrNull() && !dictionaryArg.isObject()) { 6801 if (!dictionaryArg.isUndefinedOrNull() && !dictionaryArg.isObject()) {
6789 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute( "voidMethodDictionaryArg", "TestObject", "parameter 1 ('dictionaryArg') is not a n object."), info.GetIsolate()); 6802 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute( "voidMethodDictionaryArg", "TestObject", "parameter 1 ('dictionaryArg') is not a n object."), info.GetIsolate());
6790 return; 6803 return;
6791 } 6804 }
6792 } 6805 }
6793 impl->voidMethodDictionaryArg(dictionaryArg); 6806 impl->voidMethodDictionaryArg(dictionaryArg);
6794 } 6807 }
6795 6808
6796 static void voidMethodDictionaryArgMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info) 6809 static void voidMethodDictionaryArgMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info)
6797 { 6810 {
6798 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 6811 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
6799 TestObjectV8Internal::voidMethodDictionaryArgMethod(info); 6812 TestObjectV8Internal::voidMethodDictionaryArgMethod(info);
6800 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 6813 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
6801 } 6814 }
6802 6815
6803 static void voidMethodNodeFilterArgMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info) 6816 static void voidMethodNodeFilterArgMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info)
6804 { 6817 {
6805 if (UNLIKELY(info.Length() < 1)) { 6818 if (UNLIKELY(info.Length() < 1)) {
6806 throwMinimumArityTypeErrorForMethod("voidMethodNodeFilterArg", "TestObje ct", 1, info.Length(), info.GetIsolate()); 6819 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v oidMethodNodeFilterArg", "TestObject", 1, info.Length(), info.GetIsolate()), inf o.GetIsolate());
6807 return; 6820 return;
6808 } 6821 }
6809 TestObject* impl = V8TestObject::toNative(info.Holder()); 6822 TestObject* impl = V8TestObject::toNative(info.Holder());
6810 RefPtrWillBeRawPtr<NodeFilter> nodeFilterArg; 6823 RefPtrWillBeRawPtr<NodeFilter> nodeFilterArg;
6811 { 6824 {
6812 v8::TryCatch block; 6825 v8::TryCatch block;
6813 V8RethrowTryCatchScope rethrow(block); 6826 V8RethrowTryCatchScope rethrow(block);
6814 TONATIVE_VOID_INTERNAL(nodeFilterArg, toNodeFilter(info[0], info.Holder( ), ScriptState::current(info.GetIsolate()))); 6827 TONATIVE_VOID_INTERNAL(nodeFilterArg, toNodeFilter(info[0], info.Holder( ), ScriptState::current(info.GetIsolate())));
6815 } 6828 }
6816 impl->voidMethodNodeFilterArg(nodeFilterArg.release()); 6829 impl->voidMethodNodeFilterArg(nodeFilterArg.release());
6817 } 6830 }
6818 6831
6819 static void voidMethodNodeFilterArgMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info) 6832 static void voidMethodNodeFilterArgMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info)
6820 { 6833 {
6821 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 6834 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
6822 TestObjectV8Internal::voidMethodNodeFilterArgMethod(info); 6835 TestObjectV8Internal::voidMethodNodeFilterArgMethod(info);
6823 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 6836 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
6824 } 6837 }
6825 6838
6826 static void voidMethodPromiseArgMethod(const v8::FunctionCallbackInfo<v8::Value> & info) 6839 static void voidMethodPromiseArgMethod(const v8::FunctionCallbackInfo<v8::Value> & info)
6827 { 6840 {
6828 if (UNLIKELY(info.Length() < 1)) { 6841 if (UNLIKELY(info.Length() < 1)) {
6829 throwMinimumArityTypeErrorForMethod("voidMethodPromiseArg", "TestObject" , 1, info.Length(), info.GetIsolate()); 6842 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v oidMethodPromiseArg", "TestObject", 1, info.Length(), info.GetIsolate()), info.G etIsolate());
6830 return; 6843 return;
6831 } 6844 }
6832 TestObject* impl = V8TestObject::toNative(info.Holder()); 6845 TestObject* impl = V8TestObject::toNative(info.Holder());
6833 ScriptPromise promiseArg; 6846 ScriptPromise promiseArg;
6834 { 6847 {
6835 v8::TryCatch block; 6848 v8::TryCatch block;
6836 V8RethrowTryCatchScope rethrow(block); 6849 V8RethrowTryCatchScope rethrow(block);
6837 TONATIVE_VOID_INTERNAL(promiseArg, ScriptPromise::cast(ScriptState::curr ent(info.GetIsolate()), info[0])); 6850 TONATIVE_VOID_INTERNAL(promiseArg, ScriptPromise::cast(ScriptState::curr ent(info.GetIsolate()), info[0]));
6838 if (!promiseArg.isUndefinedOrNull() && !promiseArg.isObject()) { 6851 if (!promiseArg.isUndefinedOrNull() && !promiseArg.isObject()) {
6839 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute( "voidMethodPromiseArg", "TestObject", "parameter 1 ('promiseArg') is not an obje ct."), info.GetIsolate()); 6852 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute( "voidMethodPromiseArg", "TestObject", "parameter 1 ('promiseArg') is not an obje ct."), info.GetIsolate());
6840 return; 6853 return;
6841 } 6854 }
6842 } 6855 }
6843 impl->voidMethodPromiseArg(promiseArg); 6856 impl->voidMethodPromiseArg(promiseArg);
6844 } 6857 }
6845 6858
6846 static void voidMethodPromiseArgMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info) 6859 static void voidMethodPromiseArgMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info)
6847 { 6860 {
6848 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 6861 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
6849 TestObjectV8Internal::voidMethodPromiseArgMethod(info); 6862 TestObjectV8Internal::voidMethodPromiseArgMethod(info);
6850 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 6863 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
6851 } 6864 }
6852 6865
6853 static void voidMethodSerializedScriptValueArgMethod(const v8::FunctionCallbackI nfo<v8::Value>& info) 6866 static void voidMethodSerializedScriptValueArgMethod(const v8::FunctionCallbackI nfo<v8::Value>& info)
6854 { 6867 {
6855 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodS erializedScriptValueArg", "TestObject", info.Holder(), info.GetIsolate()); 6868 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodS erializedScriptValueArg", "TestObject", info.Holder(), info.GetIsolate());
6856 if (UNLIKELY(info.Length() < 1)) { 6869 if (UNLIKELY(info.Length() < 1)) {
6857 throwMinimumArityTypeError(exceptionState, 1, info.Length()); 6870 setMinimumArityTypeError(exceptionState, 1, info.Length());
6871 exceptionState.throwIfNeeded();
6858 return; 6872 return;
6859 } 6873 }
6860 TestObject* impl = V8TestObject::toNative(info.Holder()); 6874 TestObject* impl = V8TestObject::toNative(info.Holder());
6861 RefPtr<SerializedScriptValue> serializedScriptValueArg; 6875 RefPtr<SerializedScriptValue> serializedScriptValueArg;
6862 { 6876 {
6863 serializedScriptValueArg = SerializedScriptValue::create(info[0], 0, 0, exceptionState, info.GetIsolate()); 6877 serializedScriptValueArg = SerializedScriptValue::create(info[0], 0, 0, exceptionState, info.GetIsolate());
6864 if (exceptionState.hadException()) { 6878 if (exceptionState.hadException()) {
6865 exceptionState.throwIfNeeded(); 6879 exceptionState.throwIfNeeded();
6866 return; 6880 return;
6867 } 6881 }
6868 } 6882 }
6869 impl->voidMethodSerializedScriptValueArg(serializedScriptValueArg); 6883 impl->voidMethodSerializedScriptValueArg(serializedScriptValueArg);
6870 } 6884 }
6871 6885
6872 static void voidMethodSerializedScriptValueArgMethodCallback(const v8::FunctionC allbackInfo<v8::Value>& info) 6886 static void voidMethodSerializedScriptValueArgMethodCallback(const v8::FunctionC allbackInfo<v8::Value>& info)
6873 { 6887 {
6874 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 6888 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
6875 TestObjectV8Internal::voidMethodSerializedScriptValueArgMethod(info); 6889 TestObjectV8Internal::voidMethodSerializedScriptValueArgMethod(info);
6876 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 6890 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
6877 } 6891 }
6878 6892
6879 static void voidMethodXPathNSResolverArgMethod(const v8::FunctionCallbackInfo<v8 ::Value>& info) 6893 static void voidMethodXPathNSResolverArgMethod(const v8::FunctionCallbackInfo<v8 ::Value>& info)
6880 { 6894 {
6881 if (UNLIKELY(info.Length() < 1)) { 6895 if (UNLIKELY(info.Length() < 1)) {
6882 throwMinimumArityTypeErrorForMethod("voidMethodXPathNSResolverArg", "Tes tObject", 1, info.Length(), info.GetIsolate()); 6896 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v oidMethodXPathNSResolverArg", "TestObject", 1, info.Length(), info.GetIsolate()) , info.GetIsolate());
6883 return; 6897 return;
6884 } 6898 }
6885 TestObject* impl = V8TestObject::toNative(info.Holder()); 6899 TestObject* impl = V8TestObject::toNative(info.Holder());
6886 RefPtrWillBeRawPtr<XPathNSResolver> xPathNSResolverArg; 6900 RefPtrWillBeRawPtr<XPathNSResolver> xPathNSResolverArg;
6887 { 6901 {
6888 v8::TryCatch block; 6902 v8::TryCatch block;
6889 V8RethrowTryCatchScope rethrow(block); 6903 V8RethrowTryCatchScope rethrow(block);
6890 TONATIVE_VOID_INTERNAL(xPathNSResolverArg, toXPathNSResolver(info[0], in fo.GetIsolate())); 6904 TONATIVE_VOID_INTERNAL(xPathNSResolverArg, toXPathNSResolver(info[0], in fo.GetIsolate()));
6891 } 6905 }
6892 impl->voidMethodXPathNSResolverArg(xPathNSResolverArg.release()); 6906 impl->voidMethodXPathNSResolverArg(xPathNSResolverArg.release());
6893 } 6907 }
6894 6908
6895 static void voidMethodXPathNSResolverArgMethodCallback(const v8::FunctionCallbac kInfo<v8::Value>& info) 6909 static void voidMethodXPathNSResolverArgMethodCallback(const v8::FunctionCallbac kInfo<v8::Value>& info)
6896 { 6910 {
6897 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 6911 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
6898 TestObjectV8Internal::voidMethodXPathNSResolverArgMethod(info); 6912 TestObjectV8Internal::voidMethodXPathNSResolverArgMethod(info);
6899 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 6913 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
6900 } 6914 }
6901 6915
6902 static void voidMethodDictionarySequenceArgMethod(const v8::FunctionCallbackInfo <v8::Value>& info) 6916 static void voidMethodDictionarySequenceArgMethod(const v8::FunctionCallbackInfo <v8::Value>& info)
6903 { 6917 {
6904 if (UNLIKELY(info.Length() < 1)) { 6918 if (UNLIKELY(info.Length() < 1)) {
6905 throwMinimumArityTypeErrorForMethod("voidMethodDictionarySequenceArg", " TestObject", 1, info.Length(), info.GetIsolate()); 6919 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v oidMethodDictionarySequenceArg", "TestObject", 1, info.Length(), info.GetIsolate ()), info.GetIsolate());
6906 return; 6920 return;
6907 } 6921 }
6908 TestObject* impl = V8TestObject::toNative(info.Holder()); 6922 TestObject* impl = V8TestObject::toNative(info.Holder());
6909 Vector<Dictionary> dictionarySequenceArg; 6923 Vector<Dictionary> dictionarySequenceArg;
6910 { 6924 {
6911 v8::TryCatch block; 6925 v8::TryCatch block;
6912 V8RethrowTryCatchScope rethrow(block); 6926 V8RethrowTryCatchScope rethrow(block);
6913 TONATIVE_VOID_INTERNAL(dictionarySequenceArg, toNativeArray<Dictionary>( info[0], 1, info.GetIsolate())); 6927 TONATIVE_VOID_INTERNAL(dictionarySequenceArg, toNativeArray<Dictionary>( info[0], 1, info.GetIsolate()));
6914 } 6928 }
6915 impl->voidMethodDictionarySequenceArg(dictionarySequenceArg); 6929 impl->voidMethodDictionarySequenceArg(dictionarySequenceArg);
6916 } 6930 }
6917 6931
6918 static void voidMethodDictionarySequenceArgMethodCallback(const v8::FunctionCall backInfo<v8::Value>& info) 6932 static void voidMethodDictionarySequenceArgMethodCallback(const v8::FunctionCall backInfo<v8::Value>& info)
6919 { 6933 {
6920 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 6934 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
6921 TestObjectV8Internal::voidMethodDictionarySequenceArgMethod(info); 6935 TestObjectV8Internal::voidMethodDictionarySequenceArgMethod(info);
6922 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 6936 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
6923 } 6937 }
6924 6938
6925 static void voidMethodStringArgLongArgMethod(const v8::FunctionCallbackInfo<v8:: Value>& info) 6939 static void voidMethodStringArgLongArgMethod(const v8::FunctionCallbackInfo<v8:: Value>& info)
6926 { 6940 {
6927 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodS tringArgLongArg", "TestObject", info.Holder(), info.GetIsolate()); 6941 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodS tringArgLongArg", "TestObject", info.Holder(), info.GetIsolate());
6928 if (UNLIKELY(info.Length() < 2)) { 6942 if (UNLIKELY(info.Length() < 2)) {
6929 throwMinimumArityTypeError(exceptionState, 2, info.Length()); 6943 setMinimumArityTypeError(exceptionState, 2, info.Length());
6944 exceptionState.throwIfNeeded();
6930 return; 6945 return;
6931 } 6946 }
6932 TestObject* impl = V8TestObject::toNative(info.Holder()); 6947 TestObject* impl = V8TestObject::toNative(info.Holder());
6933 V8StringResource<> stringArg; 6948 V8StringResource<> stringArg;
6934 int longArg; 6949 int longArg;
6935 { 6950 {
6936 v8::TryCatch block; 6951 v8::TryCatch block;
6937 V8RethrowTryCatchScope rethrow(block); 6952 V8RethrowTryCatchScope rethrow(block);
6938 TOSTRING_VOID_INTERNAL(stringArg, info[0]); 6953 TOSTRING_VOID_INTERNAL(stringArg, info[0]);
6939 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[1], exceptio nState), exceptionState); 6954 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[1], exceptio nState), exceptionState);
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
7085 { 7100 {
7086 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 7101 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
7087 TestObjectV8Internal::longMethodOptionalLongArgMethod(info); 7102 TestObjectV8Internal::longMethodOptionalLongArgMethod(info);
7088 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 7103 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
7089 } 7104 }
7090 7105
7091 static void voidMethodLongArgOptionalLongArgMethod(const v8::FunctionCallbackInf o<v8::Value>& info) 7106 static void voidMethodLongArgOptionalLongArgMethod(const v8::FunctionCallbackInf o<v8::Value>& info)
7092 { 7107 {
7093 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL ongArgOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); 7108 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL ongArgOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate());
7094 if (UNLIKELY(info.Length() < 1)) { 7109 if (UNLIKELY(info.Length() < 1)) {
7095 throwMinimumArityTypeError(exceptionState, 1, info.Length()); 7110 setMinimumArityTypeError(exceptionState, 1, info.Length());
7111 exceptionState.throwIfNeeded();
7096 return; 7112 return;
7097 } 7113 }
7098 TestObject* impl = V8TestObject::toNative(info.Holder()); 7114 TestObject* impl = V8TestObject::toNative(info.Holder());
7099 int longArg; 7115 int longArg;
7100 int optionalLongArg; 7116 int optionalLongArg;
7101 { 7117 {
7102 v8::TryCatch block; 7118 v8::TryCatch block;
7103 V8RethrowTryCatchScope rethrow(block); 7119 V8RethrowTryCatchScope rethrow(block);
7104 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio nState), exceptionState); 7120 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio nState), exceptionState);
7105 if (UNLIKELY(info.Length() <= 1)) { 7121 if (UNLIKELY(info.Length() <= 1)) {
7106 impl->voidMethodLongArgOptionalLongArg(longArg); 7122 impl->voidMethodLongArgOptionalLongArg(longArg);
7107 return; 7123 return;
7108 } 7124 }
7109 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(optionalLongArg, toInt32(info[1], exceptionState), exceptionState); 7125 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(optionalLongArg, toInt32(info[1], exceptionState), exceptionState);
7110 } 7126 }
7111 impl->voidMethodLongArgOptionalLongArg(longArg, optionalLongArg); 7127 impl->voidMethodLongArgOptionalLongArg(longArg, optionalLongArg);
7112 } 7128 }
7113 7129
7114 static void voidMethodLongArgOptionalLongArgMethodCallback(const v8::FunctionCal lbackInfo<v8::Value>& info) 7130 static void voidMethodLongArgOptionalLongArgMethodCallback(const v8::FunctionCal lbackInfo<v8::Value>& info)
7115 { 7131 {
7116 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 7132 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
7117 TestObjectV8Internal::voidMethodLongArgOptionalLongArgMethod(info); 7133 TestObjectV8Internal::voidMethodLongArgOptionalLongArgMethod(info);
7118 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 7134 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
7119 } 7135 }
7120 7136
7121 static void voidMethodLongArgOptionalLongArgOptionalLongArgMethod(const v8::Func tionCallbackInfo<v8::Value>& info) 7137 static void voidMethodLongArgOptionalLongArgOptionalLongArgMethod(const v8::Func tionCallbackInfo<v8::Value>& info)
7122 { 7138 {
7123 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL ongArgOptionalLongArgOptionalLongArg", "TestObject", info.Holder(), info.GetIsol ate()); 7139 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL ongArgOptionalLongArgOptionalLongArg", "TestObject", info.Holder(), info.GetIsol ate());
7124 if (UNLIKELY(info.Length() < 1)) { 7140 if (UNLIKELY(info.Length() < 1)) {
7125 throwMinimumArityTypeError(exceptionState, 1, info.Length()); 7141 setMinimumArityTypeError(exceptionState, 1, info.Length());
7142 exceptionState.throwIfNeeded();
7126 return; 7143 return;
7127 } 7144 }
7128 TestObject* impl = V8TestObject::toNative(info.Holder()); 7145 TestObject* impl = V8TestObject::toNative(info.Holder());
7129 int longArg; 7146 int longArg;
7130 int optionalLongArg1; 7147 int optionalLongArg1;
7131 int optionalLongArg2; 7148 int optionalLongArg2;
7132 { 7149 {
7133 v8::TryCatch block; 7150 v8::TryCatch block;
7134 V8RethrowTryCatchScope rethrow(block); 7151 V8RethrowTryCatchScope rethrow(block);
7135 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio nState), exceptionState); 7152 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio nState), exceptionState);
(...skipping 15 matching lines...) Expand all
7151 { 7168 {
7152 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 7169 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
7153 TestObjectV8Internal::voidMethodLongArgOptionalLongArgOptionalLongArgMethod( info); 7170 TestObjectV8Internal::voidMethodLongArgOptionalLongArgOptionalLongArgMethod( info);
7154 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 7171 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
7155 } 7172 }
7156 7173
7157 static void voidMethodLongArgOptionalTestInterfaceEmptyArgMethod(const v8::Funct ionCallbackInfo<v8::Value>& info) 7174 static void voidMethodLongArgOptionalTestInterfaceEmptyArgMethod(const v8::Funct ionCallbackInfo<v8::Value>& info)
7158 { 7175 {
7159 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL ongArgOptionalTestInterfaceEmptyArg", "TestObject", info.Holder(), info.GetIsola te()); 7176 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL ongArgOptionalTestInterfaceEmptyArg", "TestObject", info.Holder(), info.GetIsola te());
7160 if (UNLIKELY(info.Length() < 1)) { 7177 if (UNLIKELY(info.Length() < 1)) {
7161 throwMinimumArityTypeError(exceptionState, 1, info.Length()); 7178 setMinimumArityTypeError(exceptionState, 1, info.Length());
7179 exceptionState.throwIfNeeded();
7162 return; 7180 return;
7163 } 7181 }
7164 TestObject* impl = V8TestObject::toNative(info.Holder()); 7182 TestObject* impl = V8TestObject::toNative(info.Holder());
7165 int longArg; 7183 int longArg;
7166 TestInterfaceEmpty* optionalTestInterfaceEmpty; 7184 TestInterfaceEmpty* optionalTestInterfaceEmpty;
7167 { 7185 {
7168 v8::TryCatch block; 7186 v8::TryCatch block;
7169 V8RethrowTryCatchScope rethrow(block); 7187 V8RethrowTryCatchScope rethrow(block);
7170 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio nState), exceptionState); 7188 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio nState), exceptionState);
7171 if (UNLIKELY(info.Length() <= 1)) { 7189 if (UNLIKELY(info.Length() <= 1)) {
7172 impl->voidMethodLongArgOptionalTestInterfaceEmptyArg(longArg); 7190 impl->voidMethodLongArgOptionalTestInterfaceEmptyArg(longArg);
7173 return; 7191 return;
7174 } 7192 }
7175 TONATIVE_VOID_INTERNAL(optionalTestInterfaceEmpty, V8TestInterfaceEmpty: :toNativeWithTypeCheck(info.GetIsolate(), info[1])); 7193 TONATIVE_VOID_INTERNAL(optionalTestInterfaceEmpty, V8TestInterfaceEmpty: :toNativeWithTypeCheck(info.GetIsolate(), info[1]));
7176 } 7194 }
7177 impl->voidMethodLongArgOptionalTestInterfaceEmptyArg(longArg, optionalTestIn terfaceEmpty); 7195 impl->voidMethodLongArgOptionalTestInterfaceEmptyArg(longArg, optionalTestIn terfaceEmpty);
7178 } 7196 }
7179 7197
7180 static void voidMethodLongArgOptionalTestInterfaceEmptyArgMethodCallback(const v 8::FunctionCallbackInfo<v8::Value>& info) 7198 static void voidMethodLongArgOptionalTestInterfaceEmptyArgMethodCallback(const v 8::FunctionCallbackInfo<v8::Value>& info)
7181 { 7199 {
7182 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 7200 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
7183 TestObjectV8Internal::voidMethodLongArgOptionalTestInterfaceEmptyArgMethod(i nfo); 7201 TestObjectV8Internal::voidMethodLongArgOptionalTestInterfaceEmptyArgMethod(i nfo);
7184 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 7202 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
7185 } 7203 }
7186 7204
7187 static void voidMethodTestInterfaceEmptyArgOptionalLongArgMethod(const v8::Funct ionCallbackInfo<v8::Value>& info) 7205 static void voidMethodTestInterfaceEmptyArgOptionalLongArgMethod(const v8::Funct ionCallbackInfo<v8::Value>& info)
7188 { 7206 {
7189 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodT estInterfaceEmptyArgOptionalLongArg", "TestObject", info.Holder(), info.GetIsola te()); 7207 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodT estInterfaceEmptyArgOptionalLongArg", "TestObject", info.Holder(), info.GetIsola te());
7190 if (UNLIKELY(info.Length() < 1)) { 7208 if (UNLIKELY(info.Length() < 1)) {
7191 throwMinimumArityTypeError(exceptionState, 1, info.Length()); 7209 setMinimumArityTypeError(exceptionState, 1, info.Length());
7210 exceptionState.throwIfNeeded();
7192 return; 7211 return;
7193 } 7212 }
7194 TestObject* impl = V8TestObject::toNative(info.Holder()); 7213 TestObject* impl = V8TestObject::toNative(info.Holder());
7195 TestInterfaceEmpty* optionalTestInterfaceEmpty; 7214 TestInterfaceEmpty* optionalTestInterfaceEmpty;
7196 int longArg; 7215 int longArg;
7197 { 7216 {
7198 v8::TryCatch block; 7217 v8::TryCatch block;
7199 V8RethrowTryCatchScope rethrow(block); 7218 V8RethrowTryCatchScope rethrow(block);
7200 TONATIVE_VOID_INTERNAL(optionalTestInterfaceEmpty, V8TestInterfaceEmpty: :toNativeWithTypeCheck(info.GetIsolate(), info[0])); 7219 TONATIVE_VOID_INTERNAL(optionalTestInterfaceEmpty, V8TestInterfaceEmpty: :toNativeWithTypeCheck(info.GetIsolate(), info[0]));
7201 if (UNLIKELY(info.Length() <= 1)) { 7220 if (UNLIKELY(info.Length() <= 1)) {
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
7469 static void voidMethodVariadicStringArgMethodCallback(const v8::FunctionCallback Info<v8::Value>& info) 7488 static void voidMethodVariadicStringArgMethodCallback(const v8::FunctionCallback Info<v8::Value>& info)
7470 { 7489 {
7471 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 7490 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
7472 TestObjectV8Internal::voidMethodVariadicStringArgMethod(info); 7491 TestObjectV8Internal::voidMethodVariadicStringArgMethod(info);
7473 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 7492 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
7474 } 7493 }
7475 7494
7476 static void voidMethodStringArgVariadicStringArgMethod(const v8::FunctionCallbac kInfo<v8::Value>& info) 7495 static void voidMethodStringArgVariadicStringArgMethod(const v8::FunctionCallbac kInfo<v8::Value>& info)
7477 { 7496 {
7478 if (UNLIKELY(info.Length() < 1)) { 7497 if (UNLIKELY(info.Length() < 1)) {
7479 throwMinimumArityTypeErrorForMethod("voidMethodStringArgVariadicStringAr g", "TestObject", 1, info.Length(), info.GetIsolate()); 7498 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v oidMethodStringArgVariadicStringArg", "TestObject", 1, info.Length(), info.GetIs olate()), info.GetIsolate());
7480 return; 7499 return;
7481 } 7500 }
7482 TestObject* impl = V8TestObject::toNative(info.Holder()); 7501 TestObject* impl = V8TestObject::toNative(info.Holder());
7483 V8StringResource<> stringArg; 7502 V8StringResource<> stringArg;
7484 Vector<String> variadicStringArgs; 7503 Vector<String> variadicStringArgs;
7485 { 7504 {
7486 v8::TryCatch block; 7505 v8::TryCatch block;
7487 V8RethrowTryCatchScope rethrow(block); 7506 V8RethrowTryCatchScope rethrow(block);
7488 TOSTRING_VOID_INTERNAL(stringArg, info[0]); 7507 TOSTRING_VOID_INTERNAL(stringArg, info[0]);
7489 TONATIVE_VOID_INTERNAL(variadicStringArgs, toNativeArguments<String>(inf o, 1)); 7508 TONATIVE_VOID_INTERNAL(variadicStringArgs, toNativeArguments<String>(inf o, 1));
(...skipping 27 matching lines...) Expand all
7517 static void voidMethodVariadicTestInterfaceEmptyArgMethodCallback(const v8::Func tionCallbackInfo<v8::Value>& info) 7536 static void voidMethodVariadicTestInterfaceEmptyArgMethodCallback(const v8::Func tionCallbackInfo<v8::Value>& info)
7518 { 7537 {
7519 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 7538 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
7520 TestObjectV8Internal::voidMethodVariadicTestInterfaceEmptyArgMethod(info); 7539 TestObjectV8Internal::voidMethodVariadicTestInterfaceEmptyArgMethod(info);
7521 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 7540 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
7522 } 7541 }
7523 7542
7524 static void voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgMethod(c onst v8::FunctionCallbackInfo<v8::Value>& info) 7543 static void voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgMethod(c onst v8::FunctionCallbackInfo<v8::Value>& info)
7525 { 7544 {
7526 if (UNLIKELY(info.Length() < 1)) { 7545 if (UNLIKELY(info.Length() < 1)) {
7527 throwMinimumArityTypeErrorForMethod("voidMethodTestInterfaceEmptyArgVari adicTestInterfaceEmptyArg", "TestObject", 1, info.Length(), info.GetIsolate()); 7546 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v oidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArg", "TestObject", 1, i nfo.Length(), info.GetIsolate()), info.GetIsolate());
7528 return; 7547 return;
7529 } 7548 }
7530 TestObject* impl = V8TestObject::toNative(info.Holder()); 7549 TestObject* impl = V8TestObject::toNative(info.Holder());
7531 TestInterfaceEmpty* testInterfaceEmptyArg; 7550 TestInterfaceEmpty* testInterfaceEmptyArg;
7532 Vector<RefPtr<TestInterfaceEmpty> > variadicTestInterfaceEmptyArgs; 7551 Vector<RefPtr<TestInterfaceEmpty> > variadicTestInterfaceEmptyArgs;
7533 { 7552 {
7534 v8::TryCatch block; 7553 v8::TryCatch block;
7535 V8RethrowTryCatchScope rethrow(block); 7554 V8RethrowTryCatchScope rethrow(block);
7536 TONATIVE_VOID_INTERNAL(testInterfaceEmptyArg, V8TestInterfaceEmpty::toNa tiveWithTypeCheck(info.GetIsolate(), info[0])); 7555 TONATIVE_VOID_INTERNAL(testInterfaceEmptyArg, V8TestInterfaceEmpty::toNa tiveWithTypeCheck(info.GetIsolate(), info[0]));
7537 for (int i = 1; i < info.Length(); ++i) { 7556 for (int i = 1; i < info.Length(); ++i) {
(...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after
8309 { 8328 {
8310 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 8329 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
8311 TestObjectV8Internal::overloadedStaticMethodMethod(info); 8330 TestObjectV8Internal::overloadedStaticMethodMethod(info);
8312 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 8331 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
8313 } 8332 }
8314 8333
8315 static void voidMethodClampUnsignedShortArgMethod(const v8::FunctionCallbackInfo <v8::Value>& info) 8334 static void voidMethodClampUnsignedShortArgMethod(const v8::FunctionCallbackInfo <v8::Value>& info)
8316 { 8335 {
8317 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodC lampUnsignedShortArg", "TestObject", info.Holder(), info.GetIsolate()); 8336 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodC lampUnsignedShortArg", "TestObject", info.Holder(), info.GetIsolate());
8318 if (UNLIKELY(info.Length() < 1)) { 8337 if (UNLIKELY(info.Length() < 1)) {
8319 throwMinimumArityTypeError(exceptionState, 1, info.Length()); 8338 setMinimumArityTypeError(exceptionState, 1, info.Length());
8339 exceptionState.throwIfNeeded();
8320 return; 8340 return;
8321 } 8341 }
8322 TestObject* impl = V8TestObject::toNative(info.Holder()); 8342 TestObject* impl = V8TestObject::toNative(info.Holder());
8323 unsigned clampUnsignedShortArg = 0; 8343 unsigned clampUnsignedShortArg = 0;
8324 { 8344 {
8325 v8::TryCatch block; 8345 v8::TryCatch block;
8326 V8RethrowTryCatchScope rethrow(block); 8346 V8RethrowTryCatchScope rethrow(block);
8327 double clampUnsignedShortArgNativeValue; 8347 double clampUnsignedShortArgNativeValue;
8328 TONATIVE_VOID_INTERNAL(clampUnsignedShortArgNativeValue, info[0]->Number Value()); 8348 TONATIVE_VOID_INTERNAL(clampUnsignedShortArgNativeValue, info[0]->Number Value());
8329 if (!std::isnan(clampUnsignedShortArgNativeValue)) 8349 if (!std::isnan(clampUnsignedShortArgNativeValue))
8330 clampUnsignedShortArg = clampTo<unsigned short>(clampUnsignedShortAr gNativeValue); 8350 clampUnsignedShortArg = clampTo<unsigned short>(clampUnsignedShortAr gNativeValue);
8331 } 8351 }
8332 impl->voidMethodClampUnsignedShortArg(clampUnsignedShortArg); 8352 impl->voidMethodClampUnsignedShortArg(clampUnsignedShortArg);
8333 } 8353 }
8334 8354
8335 static void voidMethodClampUnsignedShortArgMethodCallback(const v8::FunctionCall backInfo<v8::Value>& info) 8355 static void voidMethodClampUnsignedShortArgMethodCallback(const v8::FunctionCall backInfo<v8::Value>& info)
8336 { 8356 {
8337 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 8357 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
8338 TestObjectV8Internal::voidMethodClampUnsignedShortArgMethod(info); 8358 TestObjectV8Internal::voidMethodClampUnsignedShortArgMethod(info);
8339 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 8359 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
8340 } 8360 }
8341 8361
8342 static void voidMethodClampUnsignedLongArgMethod(const v8::FunctionCallbackInfo< v8::Value>& info) 8362 static void voidMethodClampUnsignedLongArgMethod(const v8::FunctionCallbackInfo< v8::Value>& info)
8343 { 8363 {
8344 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodC lampUnsignedLongArg", "TestObject", info.Holder(), info.GetIsolate()); 8364 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodC lampUnsignedLongArg", "TestObject", info.Holder(), info.GetIsolate());
8345 if (UNLIKELY(info.Length() < 1)) { 8365 if (UNLIKELY(info.Length() < 1)) {
8346 throwMinimumArityTypeError(exceptionState, 1, info.Length()); 8366 setMinimumArityTypeError(exceptionState, 1, info.Length());
8367 exceptionState.throwIfNeeded();
8347 return; 8368 return;
8348 } 8369 }
8349 TestObject* impl = V8TestObject::toNative(info.Holder()); 8370 TestObject* impl = V8TestObject::toNative(info.Holder());
8350 unsigned clampUnsignedLongArg = 0; 8371 unsigned clampUnsignedLongArg = 0;
8351 { 8372 {
8352 v8::TryCatch block; 8373 v8::TryCatch block;
8353 V8RethrowTryCatchScope rethrow(block); 8374 V8RethrowTryCatchScope rethrow(block);
8354 double clampUnsignedLongArgNativeValue; 8375 double clampUnsignedLongArgNativeValue;
8355 TONATIVE_VOID_INTERNAL(clampUnsignedLongArgNativeValue, info[0]->NumberV alue()); 8376 TONATIVE_VOID_INTERNAL(clampUnsignedLongArgNativeValue, info[0]->NumberV alue());
8356 if (!std::isnan(clampUnsignedLongArgNativeValue)) 8377 if (!std::isnan(clampUnsignedLongArgNativeValue))
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
8419 { 8440 {
8420 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 8441 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
8421 TestObjectV8Internal::voidMethodDefaultUndefinedStringArgMethod(info); 8442 TestObjectV8Internal::voidMethodDefaultUndefinedStringArgMethod(info);
8422 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 8443 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
8423 } 8444 }
8424 8445
8425 static void voidMethodEnforceRangeLongArgMethod(const v8::FunctionCallbackInfo<v 8::Value>& info) 8446 static void voidMethodEnforceRangeLongArgMethod(const v8::FunctionCallbackInfo<v 8::Value>& info)
8426 { 8447 {
8427 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodE nforceRangeLongArg", "TestObject", info.Holder(), info.GetIsolate()); 8448 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodE nforceRangeLongArg", "TestObject", info.Holder(), info.GetIsolate());
8428 if (UNLIKELY(info.Length() < 1)) { 8449 if (UNLIKELY(info.Length() < 1)) {
8429 throwMinimumArityTypeError(exceptionState, 1, info.Length()); 8450 setMinimumArityTypeError(exceptionState, 1, info.Length());
8451 exceptionState.throwIfNeeded();
8430 return; 8452 return;
8431 } 8453 }
8432 TestObject* impl = V8TestObject::toNative(info.Holder()); 8454 TestObject* impl = V8TestObject::toNative(info.Holder());
8433 int enforceRangeLongArg; 8455 int enforceRangeLongArg;
8434 { 8456 {
8435 v8::TryCatch block; 8457 v8::TryCatch block;
8436 V8RethrowTryCatchScope rethrow(block); 8458 V8RethrowTryCatchScope rethrow(block);
8437 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(enforceRangeLongArg, toInt32(info[ 0], EnforceRange, exceptionState), exceptionState); 8459 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(enforceRangeLongArg, toInt32(info[ 0], EnforceRange, exceptionState), exceptionState);
8438 } 8460 }
8439 impl->voidMethodEnforceRangeLongArg(enforceRangeLongArg); 8461 impl->voidMethodEnforceRangeLongArg(enforceRangeLongArg);
8440 } 8462 }
8441 8463
8442 static void voidMethodEnforceRangeLongArgMethodCallback(const v8::FunctionCallba ckInfo<v8::Value>& info) 8464 static void voidMethodEnforceRangeLongArgMethodCallback(const v8::FunctionCallba ckInfo<v8::Value>& info)
8443 { 8465 {
8444 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 8466 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
8445 TestObjectV8Internal::voidMethodEnforceRangeLongArgMethod(info); 8467 TestObjectV8Internal::voidMethodEnforceRangeLongArgMethod(info);
8446 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 8468 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
8447 } 8469 }
8448 8470
8449 static void voidMethodTreatNullAsEmptyStringStringArgMethod(const v8::FunctionCa llbackInfo<v8::Value>& info) 8471 static void voidMethodTreatNullAsEmptyStringStringArgMethod(const v8::FunctionCa llbackInfo<v8::Value>& info)
8450 { 8472 {
8451 if (UNLIKELY(info.Length() < 1)) { 8473 if (UNLIKELY(info.Length() < 1)) {
8452 throwMinimumArityTypeErrorForMethod("voidMethodTreatNullAsEmptyStringStr ingArg", "TestObject", 1, info.Length(), info.GetIsolate()); 8474 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v oidMethodTreatNullAsEmptyStringStringArg", "TestObject", 1, info.Length(), info. GetIsolate()), info.GetIsolate());
8453 return; 8475 return;
8454 } 8476 }
8455 TestObject* impl = V8TestObject::toNative(info.Holder()); 8477 TestObject* impl = V8TestObject::toNative(info.Holder());
8456 V8StringResource<TreatNullAsEmptyString> treatNullAsEmptyStringStringArg; 8478 V8StringResource<TreatNullAsEmptyString> treatNullAsEmptyStringStringArg;
8457 { 8479 {
8458 TOSTRING_VOID_INTERNAL(treatNullAsEmptyStringStringArg, info[0]); 8480 TOSTRING_VOID_INTERNAL(treatNullAsEmptyStringStringArg, info[0]);
8459 } 8481 }
8460 impl->voidMethodTreatNullAsEmptyStringStringArg(treatNullAsEmptyStringString Arg); 8482 impl->voidMethodTreatNullAsEmptyStringStringArg(treatNullAsEmptyStringString Arg);
8461 } 8483 }
8462 8484
8463 static void voidMethodTreatNullAsEmptyStringStringArgMethodCallback(const v8::Fu nctionCallbackInfo<v8::Value>& info) 8485 static void voidMethodTreatNullAsEmptyStringStringArgMethodCallback(const v8::Fu nctionCallbackInfo<v8::Value>& info)
8464 { 8486 {
8465 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 8487 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
8466 TestObjectV8Internal::voidMethodTreatNullAsEmptyStringStringArgMethod(info); 8488 TestObjectV8Internal::voidMethodTreatNullAsEmptyStringStringArgMethod(info);
8467 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 8489 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
8468 } 8490 }
8469 8491
8470 static void voidMethodTreatNullAsNullStringStringArgMethod(const v8::FunctionCal lbackInfo<v8::Value>& info) 8492 static void voidMethodTreatNullAsNullStringStringArgMethod(const v8::FunctionCal lbackInfo<v8::Value>& info)
8471 { 8493 {
8472 if (UNLIKELY(info.Length() < 1)) { 8494 if (UNLIKELY(info.Length() < 1)) {
8473 throwMinimumArityTypeErrorForMethod("voidMethodTreatNullAsNullStringStri ngArg", "TestObject", 1, info.Length(), info.GetIsolate()); 8495 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v oidMethodTreatNullAsNullStringStringArg", "TestObject", 1, info.Length(), info.G etIsolate()), info.GetIsolate());
8474 return; 8496 return;
8475 } 8497 }
8476 TestObject* impl = V8TestObject::toNative(info.Holder()); 8498 TestObject* impl = V8TestObject::toNative(info.Holder());
8477 V8StringResource<TreatNullAsNullString> treatNullAsNullStringStringArg; 8499 V8StringResource<TreatNullAsNullString> treatNullAsNullStringStringArg;
8478 { 8500 {
8479 TOSTRING_VOID_INTERNAL(treatNullAsNullStringStringArg, info[0]); 8501 TOSTRING_VOID_INTERNAL(treatNullAsNullStringStringArg, info[0]);
8480 } 8502 }
8481 impl->voidMethodTreatNullAsNullStringStringArg(treatNullAsNullStringStringAr g); 8503 impl->voidMethodTreatNullAsNullStringStringArg(treatNullAsNullStringStringAr g);
8482 } 8504 }
8483 8505
8484 static void voidMethodTreatNullAsNullStringStringArgMethodCallback(const v8::Fun ctionCallbackInfo<v8::Value>& info) 8506 static void voidMethodTreatNullAsNullStringStringArgMethodCallback(const v8::Fun ctionCallbackInfo<v8::Value>& info)
8485 { 8507 {
8486 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 8508 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
8487 TestObjectV8Internal::voidMethodTreatNullAsNullStringStringArgMethod(info); 8509 TestObjectV8Internal::voidMethodTreatNullAsNullStringStringArgMethod(info);
8488 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 8510 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
8489 } 8511 }
8490 8512
8491 static void voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArgMe thod(const v8::FunctionCallbackInfo<v8::Value>& info) 8513 static void voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArgMe thod(const v8::FunctionCallbackInfo<v8::Value>& info)
8492 { 8514 {
8493 if (UNLIKELY(info.Length() < 1)) { 8515 if (UNLIKELY(info.Length() < 1)) {
8494 throwMinimumArityTypeErrorForMethod("voidMethodTreatNullAsNullStringTrea tUndefinedAsNullStringStringArg", "TestObject", 1, info.Length(), info.GetIsolat e()); 8516 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v oidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArg", "TestObject" , 1, info.Length(), info.GetIsolate()), info.GetIsolate());
8495 return; 8517 return;
8496 } 8518 }
8497 TestObject* impl = V8TestObject::toNative(info.Holder()); 8519 TestObject* impl = V8TestObject::toNative(info.Holder());
8498 V8StringResource<TreatNullAndUndefinedAsNullString> treatNullAsNullStringStr ingArg; 8520 V8StringResource<TreatNullAndUndefinedAsNullString> treatNullAsNullStringStr ingArg;
8499 { 8521 {
8500 TOSTRING_VOID_INTERNAL(treatNullAsNullStringStringArg, info[0]); 8522 TOSTRING_VOID_INTERNAL(treatNullAsNullStringStringArg, info[0]);
8501 } 8523 }
8502 impl->voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArg(tre atNullAsNullStringStringArg); 8524 impl->voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArg(tre atNullAsNullStringStringArg);
8503 } 8525 }
8504 8526
(...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after
9225 static void perWorldBindingsVoidMethodMethodCallbackForMainWorld(const v8::Funct ionCallbackInfo<v8::Value>& info) 9247 static void perWorldBindingsVoidMethodMethodCallbackForMainWorld(const v8::Funct ionCallbackInfo<v8::Value>& info)
9226 { 9248 {
9227 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 9249 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
9228 TestObjectV8Internal::perWorldBindingsVoidMethodMethodForMainWorld(info); 9250 TestObjectV8Internal::perWorldBindingsVoidMethodMethodForMainWorld(info);
9229 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 9251 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
9230 } 9252 }
9231 9253
9232 static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethod(const v8::Func tionCallbackInfo<v8::Value>& info) 9254 static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethod(const v8::Func tionCallbackInfo<v8::Value>& info)
9233 { 9255 {
9234 if (UNLIKELY(info.Length() < 1)) { 9256 if (UNLIKELY(info.Length() < 1)) {
9235 throwMinimumArityTypeErrorForMethod("perWorldBindingsVoidMethodTestInter faceEmptyArg", "TestObject", 1, info.Length(), info.GetIsolate()); 9257 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("p erWorldBindingsVoidMethodTestInterfaceEmptyArg", "TestObject", 1, info.Length(), info.GetIsolate()), info.GetIsolate());
9236 return; 9258 return;
9237 } 9259 }
9238 TestObject* impl = V8TestObject::toNative(info.Holder()); 9260 TestObject* impl = V8TestObject::toNative(info.Holder());
9239 TestInterfaceEmpty* testInterfaceEmptyArg; 9261 TestInterfaceEmpty* testInterfaceEmptyArg;
9240 { 9262 {
9241 v8::TryCatch block; 9263 v8::TryCatch block;
9242 V8RethrowTryCatchScope rethrow(block); 9264 V8RethrowTryCatchScope rethrow(block);
9243 TONATIVE_VOID_INTERNAL(testInterfaceEmptyArg, V8TestInterfaceEmpty::toNa tiveWithTypeCheck(info.GetIsolate(), info[0])); 9265 TONATIVE_VOID_INTERNAL(testInterfaceEmptyArg, V8TestInterfaceEmpty::toNa tiveWithTypeCheck(info.GetIsolate(), info[0]));
9244 } 9266 }
9245 impl->perWorldBindingsVoidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg) ; 9267 impl->perWorldBindingsVoidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg) ;
9246 } 9268 }
9247 9269
9248 static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 9270 static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
9249 { 9271 {
9250 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 9272 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
9251 TestObjectV8Internal::perWorldBindingsVoidMethodTestInterfaceEmptyArgMethod( info); 9273 TestObjectV8Internal::perWorldBindingsVoidMethodTestInterfaceEmptyArgMethod( info);
9252 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 9274 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
9253 } 9275 }
9254 9276
9255 static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodForMainWorld(co nst v8::FunctionCallbackInfo<v8::Value>& info) 9277 static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodForMainWorld(co nst v8::FunctionCallbackInfo<v8::Value>& info)
9256 { 9278 {
9257 if (UNLIKELY(info.Length() < 1)) { 9279 if (UNLIKELY(info.Length() < 1)) {
9258 throwMinimumArityTypeErrorForMethod("perWorldBindingsVoidMethodTestInter faceEmptyArg", "TestObject", 1, info.Length(), info.GetIsolate()); 9280 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("p erWorldBindingsVoidMethodTestInterfaceEmptyArg", "TestObject", 1, info.Length(), info.GetIsolate()), info.GetIsolate());
9259 return; 9281 return;
9260 } 9282 }
9261 TestObject* impl = V8TestObject::toNative(info.Holder()); 9283 TestObject* impl = V8TestObject::toNative(info.Holder());
9262 TestInterfaceEmpty* testInterfaceEmptyArg; 9284 TestInterfaceEmpty* testInterfaceEmptyArg;
9263 { 9285 {
9264 v8::TryCatch block; 9286 v8::TryCatch block;
9265 V8RethrowTryCatchScope rethrow(block); 9287 V8RethrowTryCatchScope rethrow(block);
9266 TONATIVE_VOID_INTERNAL(testInterfaceEmptyArg, V8TestInterfaceEmpty::toNa tiveWithTypeCheck(info.GetIsolate(), info[0])); 9288 TONATIVE_VOID_INTERNAL(testInterfaceEmptyArg, V8TestInterfaceEmpty::toNa tiveWithTypeCheck(info.GetIsolate(), info[0]));
9267 } 9289 }
9268 impl->perWorldBindingsVoidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg) ; 9290 impl->perWorldBindingsVoidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg) ;
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
9411 { 9433 {
9412 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 9434 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
9413 TestObjectV8Internal::raisesExceptionVoidMethodOptionalLongArgMethod(info); 9435 TestObjectV8Internal::raisesExceptionVoidMethodOptionalLongArgMethod(info);
9414 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 9436 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
9415 } 9437 }
9416 9438
9417 static void raisesExceptionVoidMethodTestCallbackInterfaceArgMethod(const v8::Fu nctionCallbackInfo<v8::Value>& info) 9439 static void raisesExceptionVoidMethodTestCallbackInterfaceArgMethod(const v8::Fu nctionCallbackInfo<v8::Value>& info)
9418 { 9440 {
9419 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep tionVoidMethodTestCallbackInterfaceArg", "TestObject", info.Holder(), info.GetIs olate()); 9441 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep tionVoidMethodTestCallbackInterfaceArg", "TestObject", info.Holder(), info.GetIs olate());
9420 if (UNLIKELY(info.Length() < 1)) { 9442 if (UNLIKELY(info.Length() < 1)) {
9421 throwMinimumArityTypeError(exceptionState, 1, info.Length()); 9443 setMinimumArityTypeError(exceptionState, 1, info.Length());
9444 exceptionState.throwIfNeeded();
9422 return; 9445 return;
9423 } 9446 }
9424 TestObject* impl = V8TestObject::toNative(info.Holder()); 9447 TestObject* impl = V8TestObject::toNative(info.Holder());
9425 OwnPtr<TestCallbackInterface> testCallbackInterfaceArg; 9448 OwnPtr<TestCallbackInterface> testCallbackInterfaceArg;
9426 { 9449 {
9427 if (info.Length() <= 0 || !info[0]->IsFunction()) { 9450 if (info.Length() <= 0 || !info[0]->IsFunction()) {
9428 exceptionState.throwTypeError("The callback provided as parameter 1 is not a function."); 9451 exceptionState.throwTypeError("The callback provided as parameter 1 is not a function.");
9429 exceptionState.throwIfNeeded(); 9452 exceptionState.throwIfNeeded();
9430 return; 9453 return;
9431 } 9454 }
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
9490 { 9513 {
9491 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 9514 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
9492 TestObjectV8Internal::raisesExceptionTestInterfaceEmptyVoidMethodMethod(info ); 9515 TestObjectV8Internal::raisesExceptionTestInterfaceEmptyVoidMethodMethod(info );
9493 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 9516 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
9494 } 9517 }
9495 9518
9496 static void callWithExecutionContextRaisesExceptionVoidMethodLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 9519 static void callWithExecutionContextRaisesExceptionVoidMethodLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
9497 { 9520 {
9498 ExceptionState exceptionState(ExceptionState::ExecutionContext, "callWithExe cutionContextRaisesExceptionVoidMethodLongArg", "TestObject", info.Holder(), inf o.GetIsolate()); 9521 ExceptionState exceptionState(ExceptionState::ExecutionContext, "callWithExe cutionContextRaisesExceptionVoidMethodLongArg", "TestObject", info.Holder(), inf o.GetIsolate());
9499 if (UNLIKELY(info.Length() < 1)) { 9522 if (UNLIKELY(info.Length() < 1)) {
9500 throwMinimumArityTypeError(exceptionState, 1, info.Length()); 9523 setMinimumArityTypeError(exceptionState, 1, info.Length());
9524 exceptionState.throwIfNeeded();
9501 return; 9525 return;
9502 } 9526 }
9503 TestObject* impl = V8TestObject::toNative(info.Holder()); 9527 TestObject* impl = V8TestObject::toNative(info.Holder());
9504 int longArg; 9528 int longArg;
9505 { 9529 {
9506 v8::TryCatch block; 9530 v8::TryCatch block;
9507 V8RethrowTryCatchScope rethrow(block); 9531 V8RethrowTryCatchScope rethrow(block);
9508 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio nState), exceptionState); 9532 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio nState), exceptionState);
9509 } 9533 }
9510 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ()); 9534 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
9769 static void treatReturnedNullStringAsUndefinedScalarValueStringMethodMethodCallb ack(const v8::FunctionCallbackInfo<v8::Value>& info) 9793 static void treatReturnedNullStringAsUndefinedScalarValueStringMethodMethodCallb ack(const v8::FunctionCallbackInfo<v8::Value>& info)
9770 { 9794 {
9771 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 9795 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
9772 TestObjectV8Internal::treatReturnedNullStringAsUndefinedScalarValueStringMet hodMethod(info); 9796 TestObjectV8Internal::treatReturnedNullStringAsUndefinedScalarValueStringMet hodMethod(info);
9773 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 9797 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
9774 } 9798 }
9775 9799
9776 static void typeCheckingInterfaceVoidMethodTestInterfaceEmptyArgMethod(const v8: :FunctionCallbackInfo<v8::Value>& info) 9800 static void typeCheckingInterfaceVoidMethodTestInterfaceEmptyArgMethod(const v8: :FunctionCallbackInfo<v8::Value>& info)
9777 { 9801 {
9778 if (UNLIKELY(info.Length() < 1)) { 9802 if (UNLIKELY(info.Length() < 1)) {
9779 throwMinimumArityTypeErrorForMethod("typeCheckingInterfaceVoidMethodTest InterfaceEmptyArg", "TestObject", 1, info.Length(), info.GetIsolate()); 9803 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("t ypeCheckingInterfaceVoidMethodTestInterfaceEmptyArg", "TestObject", 1, info.Leng th(), info.GetIsolate()), info.GetIsolate());
9780 return; 9804 return;
9781 } 9805 }
9782 TestObject* impl = V8TestObject::toNative(info.Holder()); 9806 TestObject* impl = V8TestObject::toNative(info.Holder());
9783 TestInterfaceEmpty* testInterfaceEmptyArg; 9807 TestInterfaceEmpty* testInterfaceEmptyArg;
9784 { 9808 {
9785 v8::TryCatch block; 9809 v8::TryCatch block;
9786 V8RethrowTryCatchScope rethrow(block); 9810 V8RethrowTryCatchScope rethrow(block);
9787 if (info.Length() > 0 && !V8TestInterfaceEmpty::hasInstance(info[0], inf o.GetIsolate())) { 9811 if (info.Length() > 0 && !V8TestInterfaceEmpty::hasInstance(info[0], inf o.GetIsolate())) {
9788 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute( "typeCheckingInterfaceVoidMethodTestInterfaceEmptyArg", "TestObject", "parameter 1 is not of type 'TestInterfaceEmpty'."), info.GetIsolate()); 9812 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute( "typeCheckingInterfaceVoidMethodTestInterfaceEmptyArg", "TestObject", "parameter 1 is not of type 'TestInterfaceEmpty'."), info.GetIsolate());
9789 return; 9813 return;
(...skipping 29 matching lines...) Expand all
9819 static void typeCheckingInterfaceVoidMethodTestInterfaceEmptyVariadicArgMethodCa llback(const v8::FunctionCallbackInfo<v8::Value>& info) 9843 static void typeCheckingInterfaceVoidMethodTestInterfaceEmptyVariadicArgMethodCa llback(const v8::FunctionCallbackInfo<v8::Value>& info)
9820 { 9844 {
9821 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 9845 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
9822 TestObjectV8Internal::typeCheckingInterfaceVoidMethodTestInterfaceEmptyVaria dicArgMethod(info); 9846 TestObjectV8Internal::typeCheckingInterfaceVoidMethodTestInterfaceEmptyVaria dicArgMethod(info);
9823 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 9847 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
9824 } 9848 }
9825 9849
9826 static void typeCheckingUnrestrictedVoidMethodFloatArgDoubleArgMethod(const v8:: FunctionCallbackInfo<v8::Value>& info) 9850 static void typeCheckingUnrestrictedVoidMethodFloatArgDoubleArgMethod(const v8:: FunctionCallbackInfo<v8::Value>& info)
9827 { 9851 {
9828 if (UNLIKELY(info.Length() < 2)) { 9852 if (UNLIKELY(info.Length() < 2)) {
9829 throwMinimumArityTypeErrorForMethod("typeCheckingUnrestrictedVoidMethodF loatArgDoubleArg", "TestObject", 2, info.Length(), info.GetIsolate()); 9853 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("t ypeCheckingUnrestrictedVoidMethodFloatArgDoubleArg", "TestObject", 2, info.Lengt h(), info.GetIsolate()), info.GetIsolate());
9830 return; 9854 return;
9831 } 9855 }
9832 TestObject* impl = V8TestObject::toNative(info.Holder()); 9856 TestObject* impl = V8TestObject::toNative(info.Holder());
9833 float floatArg; 9857 float floatArg;
9834 double doubleArg; 9858 double doubleArg;
9835 { 9859 {
9836 v8::TryCatch block; 9860 v8::TryCatch block;
9837 V8RethrowTryCatchScope rethrow(block); 9861 V8RethrowTryCatchScope rethrow(block);
9838 TONATIVE_VOID_INTERNAL(floatArg, static_cast<float>(info[0]->NumberValue ())); 9862 TONATIVE_VOID_INTERNAL(floatArg, static_cast<float>(info[0]->NumberValue ()));
9839 if (!std::isfinite(floatArg)) { 9863 if (!std::isfinite(floatArg)) {
(...skipping 25 matching lines...) Expand all
9865 static void unforgeableVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info) 9889 static void unforgeableVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info)
9866 { 9890 {
9867 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 9891 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
9868 TestObjectV8Internal::unforgeableVoidMethodMethod(info); 9892 TestObjectV8Internal::unforgeableVoidMethodMethod(info);
9869 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 9893 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
9870 } 9894 }
9871 9895
9872 static void voidMethodTestInterfaceGarbageCollectedSequenceArgMethod(const v8::F unctionCallbackInfo<v8::Value>& info) 9896 static void voidMethodTestInterfaceGarbageCollectedSequenceArgMethod(const v8::F unctionCallbackInfo<v8::Value>& info)
9873 { 9897 {
9874 if (UNLIKELY(info.Length() < 1)) { 9898 if (UNLIKELY(info.Length() < 1)) {
9875 throwMinimumArityTypeErrorForMethod("voidMethodTestInterfaceGarbageColle ctedSequenceArg", "TestObject", 1, info.Length(), info.GetIsolate()); 9899 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v oidMethodTestInterfaceGarbageCollectedSequenceArg", "TestObject", 1, info.Length (), info.GetIsolate()), info.GetIsolate());
9876 return; 9900 return;
9877 } 9901 }
9878 TestObject* impl = V8TestObject::toNative(info.Holder()); 9902 TestObject* impl = V8TestObject::toNative(info.Holder());
9879 HeapVector<Member<TestInterfaceGarbageCollected> > testInterfaceGarbageColle ctedSequenceArg; 9903 HeapVector<Member<TestInterfaceGarbageCollected> > testInterfaceGarbageColle ctedSequenceArg;
9880 { 9904 {
9881 v8::TryCatch block; 9905 v8::TryCatch block;
9882 V8RethrowTryCatchScope rethrow(block); 9906 V8RethrowTryCatchScope rethrow(block);
9883 TONATIVE_VOID_INTERNAL(testInterfaceGarbageCollectedSequenceArg, (toMemb erNativeArray<TestInterfaceGarbageCollected, V8TestInterfaceGarbageCollected>(in fo[0], 1, info.GetIsolate()))); 9907 TONATIVE_VOID_INTERNAL(testInterfaceGarbageCollectedSequenceArg, (toMemb erNativeArray<TestInterfaceGarbageCollected, V8TestInterfaceGarbageCollected>(in fo[0], 1, info.GetIsolate())));
9884 } 9908 }
9885 impl->voidMethodTestInterfaceGarbageCollectedSequenceArg(testInterfaceGarbag eCollectedSequenceArg); 9909 impl->voidMethodTestInterfaceGarbageCollectedSequenceArg(testInterfaceGarbag eCollectedSequenceArg);
9886 } 9910 }
9887 9911
9888 static void voidMethodTestInterfaceGarbageCollectedSequenceArgMethodCallback(con st v8::FunctionCallbackInfo<v8::Value>& info) 9912 static void voidMethodTestInterfaceGarbageCollectedSequenceArgMethodCallback(con st v8::FunctionCallbackInfo<v8::Value>& info)
9889 { 9913 {
9890 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 9914 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
9891 TestObjectV8Internal::voidMethodTestInterfaceGarbageCollectedSequenceArgMeth od(info); 9915 TestObjectV8Internal::voidMethodTestInterfaceGarbageCollectedSequenceArgMeth od(info);
9892 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 9916 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
9893 } 9917 }
9894 9918
9895 static void voidMethodTestInterfaceGarbageCollectedArrayArgMethod(const v8::Func tionCallbackInfo<v8::Value>& info) 9919 static void voidMethodTestInterfaceGarbageCollectedArrayArgMethod(const v8::Func tionCallbackInfo<v8::Value>& info)
9896 { 9920 {
9897 if (UNLIKELY(info.Length() < 1)) { 9921 if (UNLIKELY(info.Length() < 1)) {
9898 throwMinimumArityTypeErrorForMethod("voidMethodTestInterfaceGarbageColle ctedArrayArg", "TestObject", 1, info.Length(), info.GetIsolate()); 9922 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v oidMethodTestInterfaceGarbageCollectedArrayArg", "TestObject", 1, info.Length(), info.GetIsolate()), info.GetIsolate());
9899 return; 9923 return;
9900 } 9924 }
9901 TestObject* impl = V8TestObject::toNative(info.Holder()); 9925 TestObject* impl = V8TestObject::toNative(info.Holder());
9902 HeapVector<Member<TestInterfaceGarbageCollected> > testInterfaceGarbageColle ctedArrayArg; 9926 HeapVector<Member<TestInterfaceGarbageCollected> > testInterfaceGarbageColle ctedArrayArg;
9903 { 9927 {
9904 v8::TryCatch block; 9928 v8::TryCatch block;
9905 V8RethrowTryCatchScope rethrow(block); 9929 V8RethrowTryCatchScope rethrow(block);
9906 TONATIVE_VOID_INTERNAL(testInterfaceGarbageCollectedArrayArg, (toMemberN ativeArray<TestInterfaceGarbageCollected, V8TestInterfaceGarbageCollected>(info[ 0], 1, info.GetIsolate()))); 9930 TONATIVE_VOID_INTERNAL(testInterfaceGarbageCollectedArrayArg, (toMemberN ativeArray<TestInterfaceGarbageCollected, V8TestInterfaceGarbageCollected>(info[ 0], 1, info.GetIsolate())));
9907 } 9931 }
9908 impl->voidMethodTestInterfaceGarbageCollectedArrayArg(testInterfaceGarbageCo llectedArrayArg); 9932 impl->voidMethodTestInterfaceGarbageCollectedArrayArg(testInterfaceGarbageCo llectedArrayArg);
9909 } 9933 }
9910 9934
9911 static void voidMethodTestInterfaceGarbageCollectedArrayArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 9935 static void voidMethodTestInterfaceGarbageCollectedArrayArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
9912 { 9936 {
9913 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 9937 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
9914 TestObjectV8Internal::voidMethodTestInterfaceGarbageCollectedArrayArgMethod( info); 9938 TestObjectV8Internal::voidMethodTestInterfaceGarbageCollectedArrayArgMethod( info);
9915 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 9939 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
9916 } 9940 }
9917 9941
9918 static void voidMethodTestInterfaceWillBeGarbageCollectedSequenceArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 9942 static void voidMethodTestInterfaceWillBeGarbageCollectedSequenceArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
9919 { 9943 {
9920 if (UNLIKELY(info.Length() < 1)) { 9944 if (UNLIKELY(info.Length() < 1)) {
9921 throwMinimumArityTypeErrorForMethod("voidMethodTestInterfaceWillBeGarbag eCollectedSequenceArg", "TestObject", 1, info.Length(), info.GetIsolate()); 9945 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v oidMethodTestInterfaceWillBeGarbageCollectedSequenceArg", "TestObject", 1, info. Length(), info.GetIsolate()), info.GetIsolate());
9922 return; 9946 return;
9923 } 9947 }
9924 TestObject* impl = V8TestObject::toNative(info.Holder()); 9948 TestObject* impl = V8TestObject::toNative(info.Holder());
9925 WillBeHeapVector<RefPtrWillBeMember<TestInterfaceWillBeGarbageCollected> > t estInterfaceWillBeGarbageCollectedSequenceArg; 9949 WillBeHeapVector<RefPtrWillBeMember<TestInterfaceWillBeGarbageCollected> > t estInterfaceWillBeGarbageCollectedSequenceArg;
9926 { 9950 {
9927 v8::TryCatch block; 9951 v8::TryCatch block;
9928 V8RethrowTryCatchScope rethrow(block); 9952 V8RethrowTryCatchScope rethrow(block);
9929 TONATIVE_VOID_INTERNAL(testInterfaceWillBeGarbageCollectedSequenceArg, ( toRefPtrWillBeMemberNativeArray<TestInterfaceWillBeGarbageCollected, V8TestInter faceWillBeGarbageCollected>(info[0], 1, info.GetIsolate()))); 9953 TONATIVE_VOID_INTERNAL(testInterfaceWillBeGarbageCollectedSequenceArg, ( toRefPtrWillBeMemberNativeArray<TestInterfaceWillBeGarbageCollected, V8TestInter faceWillBeGarbageCollected>(info[0], 1, info.GetIsolate())));
9930 } 9954 }
9931 impl->voidMethodTestInterfaceWillBeGarbageCollectedSequenceArg(testInterface WillBeGarbageCollectedSequenceArg); 9955 impl->voidMethodTestInterfaceWillBeGarbageCollectedSequenceArg(testInterface WillBeGarbageCollectedSequenceArg);
9932 } 9956 }
9933 9957
9934 static void voidMethodTestInterfaceWillBeGarbageCollectedSequenceArgMethodCallba ck(const v8::FunctionCallbackInfo<v8::Value>& info) 9958 static void voidMethodTestInterfaceWillBeGarbageCollectedSequenceArgMethodCallba ck(const v8::FunctionCallbackInfo<v8::Value>& info)
9935 { 9959 {
9936 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 9960 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
9937 TestObjectV8Internal::voidMethodTestInterfaceWillBeGarbageCollectedSequenceA rgMethod(info); 9961 TestObjectV8Internal::voidMethodTestInterfaceWillBeGarbageCollectedSequenceA rgMethod(info);
9938 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 9962 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
9939 } 9963 }
9940 9964
9941 static void voidMethodTestInterfaceWillBeGarbageCollectedArrayArgMethod(const v8 ::FunctionCallbackInfo<v8::Value>& info) 9965 static void voidMethodTestInterfaceWillBeGarbageCollectedArrayArgMethod(const v8 ::FunctionCallbackInfo<v8::Value>& info)
9942 { 9966 {
9943 if (UNLIKELY(info.Length() < 1)) { 9967 if (UNLIKELY(info.Length() < 1)) {
9944 throwMinimumArityTypeErrorForMethod("voidMethodTestInterfaceWillBeGarbag eCollectedArrayArg", "TestObject", 1, info.Length(), info.GetIsolate()); 9968 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v oidMethodTestInterfaceWillBeGarbageCollectedArrayArg", "TestObject", 1, info.Len gth(), info.GetIsolate()), info.GetIsolate());
9945 return; 9969 return;
9946 } 9970 }
9947 TestObject* impl = V8TestObject::toNative(info.Holder()); 9971 TestObject* impl = V8TestObject::toNative(info.Holder());
9948 WillBeHeapVector<RefPtrWillBeMember<TestInterfaceWillBeGarbageCollected> > t estInterfaceWillBeGarbageCollectedArrayArg; 9972 WillBeHeapVector<RefPtrWillBeMember<TestInterfaceWillBeGarbageCollected> > t estInterfaceWillBeGarbageCollectedArrayArg;
9949 { 9973 {
9950 v8::TryCatch block; 9974 v8::TryCatch block;
9951 V8RethrowTryCatchScope rethrow(block); 9975 V8RethrowTryCatchScope rethrow(block);
9952 TONATIVE_VOID_INTERNAL(testInterfaceWillBeGarbageCollectedArrayArg, (toR efPtrWillBeMemberNativeArray<TestInterfaceWillBeGarbageCollected, V8TestInterfac eWillBeGarbageCollected>(info[0], 1, info.GetIsolate()))); 9976 TONATIVE_VOID_INTERNAL(testInterfaceWillBeGarbageCollectedArrayArg, (toR efPtrWillBeMemberNativeArray<TestInterfaceWillBeGarbageCollected, V8TestInterfac eWillBeGarbageCollected>(info[0], 1, info.GetIsolate())));
9953 } 9977 }
9954 impl->voidMethodTestInterfaceWillBeGarbageCollectedArrayArg(testInterfaceWil lBeGarbageCollectedArrayArg); 9978 impl->voidMethodTestInterfaceWillBeGarbageCollectedArrayArg(testInterfaceWil lBeGarbageCollectedArrayArg);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
9987 { 10011 {
9988 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 10012 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
9989 TestObjectV8Internal::shortMethodImplementedInPrivateScriptMethod(info); 10013 TestObjectV8Internal::shortMethodImplementedInPrivateScriptMethod(info);
9990 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 10014 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
9991 } 10015 }
9992 10016
9993 static void shortMethodWithShortArgumentImplementedInPrivateScriptMethod(const v 8::FunctionCallbackInfo<v8::Value>& info) 10017 static void shortMethodWithShortArgumentImplementedInPrivateScriptMethod(const v 8::FunctionCallbackInfo<v8::Value>& info)
9994 { 10018 {
9995 ExceptionState exceptionState(ExceptionState::ExecutionContext, "shortMethod WithShortArgumentImplementedInPrivateScript", "TestObject", info.Holder(), info. GetIsolate()); 10019 ExceptionState exceptionState(ExceptionState::ExecutionContext, "shortMethod WithShortArgumentImplementedInPrivateScript", "TestObject", info.Holder(), info. GetIsolate());
9996 if (UNLIKELY(info.Length() < 1)) { 10020 if (UNLIKELY(info.Length() < 1)) {
9997 throwMinimumArityTypeError(exceptionState, 1, info.Length()); 10021 setMinimumArityTypeError(exceptionState, 1, info.Length());
10022 exceptionState.throwIfNeeded();
9998 return; 10023 return;
9999 } 10024 }
10000 TestObject* impl = V8TestObject::toNative(info.Holder()); 10025 TestObject* impl = V8TestObject::toNative(info.Holder());
10001 int value; 10026 int value;
10002 { 10027 {
10003 v8::TryCatch block; 10028 v8::TryCatch block;
10004 V8RethrowTryCatchScope rethrow(block); 10029 V8RethrowTryCatchScope rethrow(block);
10005 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(value, toInt16(info[0], exceptionS tate), exceptionState); 10030 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(value, toInt16(info[0], exceptionS tate), exceptionState);
10006 } 10031 }
10007 int result = 0; 10032 int result = 0;
10008 if (!V8TestObject::PrivateScript::shortMethodWithShortArgumentImplementedInP rivateScriptMethod(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext()), impl, value, &result)) 10033 if (!V8TestObject::PrivateScript::shortMethodWithShortArgumentImplementedInP rivateScriptMethod(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext()), impl, value, &result))
10009 return; 10034 return;
10010 v8SetReturnValueInt(info, result); 10035 v8SetReturnValueInt(info, result);
10011 } 10036 }
10012 10037
10013 static void shortMethodWithShortArgumentImplementedInPrivateScriptMethodCallback (const v8::FunctionCallbackInfo<v8::Value>& info) 10038 static void shortMethodWithShortArgumentImplementedInPrivateScriptMethodCallback (const v8::FunctionCallbackInfo<v8::Value>& info)
10014 { 10039 {
10015 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 10040 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
10016 TestObjectV8Internal::shortMethodWithShortArgumentImplementedInPrivateScript Method(info); 10041 TestObjectV8Internal::shortMethodWithShortArgumentImplementedInPrivateScript Method(info);
10017 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 10042 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
10018 } 10043 }
10019 10044
10020 static void stringMethodWithStringArgumentImplementedInPrivateScriptMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 10045 static void stringMethodWithStringArgumentImplementedInPrivateScriptMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
10021 { 10046 {
10022 if (UNLIKELY(info.Length() < 1)) { 10047 if (UNLIKELY(info.Length() < 1)) {
10023 throwMinimumArityTypeErrorForMethod("stringMethodWithStringArgumentImple mentedInPrivateScript", "TestObject", 1, info.Length(), info.GetIsolate()); 10048 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("s tringMethodWithStringArgumentImplementedInPrivateScript", "TestObject", 1, info. Length(), info.GetIsolate()), info.GetIsolate());
10024 return; 10049 return;
10025 } 10050 }
10026 TestObject* impl = V8TestObject::toNative(info.Holder()); 10051 TestObject* impl = V8TestObject::toNative(info.Holder());
10027 V8StringResource<> value; 10052 V8StringResource<> value;
10028 { 10053 {
10029 TOSTRING_VOID_INTERNAL(value, info[0]); 10054 TOSTRING_VOID_INTERNAL(value, info[0]);
10030 } 10055 }
10031 String result; 10056 String result;
10032 if (!V8TestObject::PrivateScript::stringMethodWithStringArgumentImplementedI nPrivateScriptMethod(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext() ), impl, value, &result)) 10057 if (!V8TestObject::PrivateScript::stringMethodWithStringArgumentImplementedI nPrivateScriptMethod(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext() ), impl, value, &result))
10033 return; 10058 return;
10034 v8SetReturnValueString(info, result, info.GetIsolate()); 10059 v8SetReturnValueString(info, result, info.GetIsolate());
10035 } 10060 }
10036 10061
10037 static void stringMethodWithStringArgumentImplementedInPrivateScriptMethodCallba ck(const v8::FunctionCallbackInfo<v8::Value>& info) 10062 static void stringMethodWithStringArgumentImplementedInPrivateScriptMethodCallba ck(const v8::FunctionCallbackInfo<v8::Value>& info)
10038 { 10063 {
10039 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 10064 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
10040 TestObjectV8Internal::stringMethodWithStringArgumentImplementedInPrivateScri ptMethod(info); 10065 TestObjectV8Internal::stringMethodWithStringArgumentImplementedInPrivateScri ptMethod(info);
10041 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 10066 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
10042 } 10067 }
10043 10068
10044 static void nodeMethodWithNodeArgumentImplementedInPrivateScriptMethod(const v8: :FunctionCallbackInfo<v8::Value>& info) 10069 static void nodeMethodWithNodeArgumentImplementedInPrivateScriptMethod(const v8: :FunctionCallbackInfo<v8::Value>& info)
10045 { 10070 {
10046 if (UNLIKELY(info.Length() < 1)) { 10071 if (UNLIKELY(info.Length() < 1)) {
10047 throwMinimumArityTypeErrorForMethod("nodeMethodWithNodeArgumentImplement edInPrivateScript", "TestObject", 1, info.Length(), info.GetIsolate()); 10072 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("n odeMethodWithNodeArgumentImplementedInPrivateScript", "TestObject", 1, info.Leng th(), info.GetIsolate()), info.GetIsolate());
10048 return; 10073 return;
10049 } 10074 }
10050 TestObject* impl = V8TestObject::toNative(info.Holder()); 10075 TestObject* impl = V8TestObject::toNative(info.Holder());
10051 Node* value; 10076 Node* value;
10052 { 10077 {
10053 v8::TryCatch block; 10078 v8::TryCatch block;
10054 V8RethrowTryCatchScope rethrow(block); 10079 V8RethrowTryCatchScope rethrow(block);
10055 TONATIVE_VOID_INTERNAL(value, V8Node::toNativeWithTypeCheck(info.GetIsol ate(), info[0])); 10080 TONATIVE_VOID_INTERNAL(value, V8Node::toNativeWithTypeCheck(info.GetIsol ate(), info[0]));
10056 } 10081 }
10057 RefPtrWillBeRawPtr<Node> result; 10082 RefPtrWillBeRawPtr<Node> result;
10058 if (!V8TestObject::PrivateScript::nodeMethodWithNodeArgumentImplementedInPri vateScriptMethod(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext()), i mpl, value, &result)) 10083 if (!V8TestObject::PrivateScript::nodeMethodWithNodeArgumentImplementedInPri vateScriptMethod(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext()), i mpl, value, &result))
10059 return; 10084 return;
10060 v8SetReturnValue(info, result.release()); 10085 v8SetReturnValue(info, result.release());
10061 } 10086 }
10062 10087
10063 static void nodeMethodWithNodeArgumentImplementedInPrivateScriptMethodCallback(c onst v8::FunctionCallbackInfo<v8::Value>& info) 10088 static void nodeMethodWithNodeArgumentImplementedInPrivateScriptMethodCallback(c onst v8::FunctionCallbackInfo<v8::Value>& info)
10064 { 10089 {
10065 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 10090 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
10066 TestObjectV8Internal::nodeMethodWithNodeArgumentImplementedInPrivateScriptMe thod(info); 10091 TestObjectV8Internal::nodeMethodWithNodeArgumentImplementedInPrivateScriptMe thod(info);
10067 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 10092 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
10068 } 10093 }
10069 10094
10070 static void nodeMethodWithVariousArgumentsImplementedInPrivateScriptMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 10095 static void nodeMethodWithVariousArgumentsImplementedInPrivateScriptMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
10071 { 10096 {
10072 ExceptionState exceptionState(ExceptionState::ExecutionContext, "nodeMethodW ithVariousArgumentsImplementedInPrivateScript", "TestObject", info.Holder(), inf o.GetIsolate()); 10097 ExceptionState exceptionState(ExceptionState::ExecutionContext, "nodeMethodW ithVariousArgumentsImplementedInPrivateScript", "TestObject", info.Holder(), inf o.GetIsolate());
10073 if (UNLIKELY(info.Length() < 5)) { 10098 if (UNLIKELY(info.Length() < 5)) {
10074 throwMinimumArityTypeError(exceptionState, 5, info.Length()); 10099 setMinimumArityTypeError(exceptionState, 5, info.Length());
10100 exceptionState.throwIfNeeded();
10075 return; 10101 return;
10076 } 10102 }
10077 TestObject* impl = V8TestObject::toNative(info.Holder()); 10103 TestObject* impl = V8TestObject::toNative(info.Holder());
10078 Document* document; 10104 Document* document;
10079 Node* node; 10105 Node* node;
10080 int value1; 10106 int value1;
10081 double value2; 10107 double value2;
10082 V8StringResource<> string; 10108 V8StringResource<> string;
10083 { 10109 {
10084 v8::TryCatch block; 10110 v8::TryCatch block;
(...skipping 14 matching lines...) Expand all
10099 { 10125 {
10100 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 10126 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
10101 TestObjectV8Internal::nodeMethodWithVariousArgumentsImplementedInPrivateScri ptMethod(info); 10127 TestObjectV8Internal::nodeMethodWithVariousArgumentsImplementedInPrivateScri ptMethod(info);
10102 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 10128 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
10103 } 10129 }
10104 10130
10105 static void methodImplementedInCPPForPrivateScriptOnlyMethod(const v8::FunctionC allbackInfo<v8::Value>& info) 10131 static void methodImplementedInCPPForPrivateScriptOnlyMethod(const v8::FunctionC allbackInfo<v8::Value>& info)
10106 { 10132 {
10107 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodImple mentedInCPPForPrivateScriptOnly", "TestObject", info.Holder(), info.GetIsolate() ); 10133 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodImple mentedInCPPForPrivateScriptOnly", "TestObject", info.Holder(), info.GetIsolate() );
10108 if (UNLIKELY(info.Length() < 2)) { 10134 if (UNLIKELY(info.Length() < 2)) {
10109 throwMinimumArityTypeError(exceptionState, 2, info.Length()); 10135 setMinimumArityTypeError(exceptionState, 2, info.Length());
10136 exceptionState.throwIfNeeded();
10110 return; 10137 return;
10111 } 10138 }
10112 TestObject* impl = V8TestObject::toNative(info.Holder()); 10139 TestObject* impl = V8TestObject::toNative(info.Holder());
10113 int value1; 10140 int value1;
10114 int value2; 10141 int value2;
10115 { 10142 {
10116 v8::TryCatch block; 10143 v8::TryCatch block;
10117 V8RethrowTryCatchScope rethrow(block); 10144 V8RethrowTryCatchScope rethrow(block);
10118 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(value1, toInt16(info[0], exception State), exceptionState); 10145 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(value1, toInt16(info[0], exception State), exceptionState);
10119 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(value2, toInt16(info[1], exception State), exceptionState); 10146 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(value2, toInt16(info[1], exception State), exceptionState);
(...skipping 1137 matching lines...) Expand 10 before | Expand all | Expand 10 after
11257 // FIXME: We should support more exceptions. 11284 // FIXME: We should support more exceptions.
11258 RELEASE_ASSERT_NOT_REACHED(); 11285 RELEASE_ASSERT_NOT_REACHED();
11259 } 11286 }
11260 block.ReThrow(); 11287 block.ReThrow();
11261 return false; 11288 return false;
11262 } 11289 }
11263 return true; 11290 return true;
11264 } 11291 }
11265 11292
11266 } // namespace blink 11293 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698