OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * Copyright (C) 2012 Ericsson AB. All rights reserved. | 3 * Copyright (C) 2012 Ericsson AB. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 // Conversion flags, used in toIntXX/toUIntXX. | 367 // Conversion flags, used in toIntXX/toUIntXX. |
368 enum IntegerConversionConfiguration { | 368 enum IntegerConversionConfiguration { |
369 NormalConversion, | 369 NormalConversion, |
370 EnforceRange, | 370 EnforceRange, |
371 Clamp | 371 Clamp |
372 }; | 372 }; |
373 | 373 |
374 // Convert a value to a 8-bit signed integer. The conversion fails if the | 374 // Convert a value to a 8-bit signed integer. The conversion fails if the |
375 // value cannot be converted to a number or the range violated per WebIDL: | 375 // value cannot be converted to a number or the range violated per WebIDL: |
376 // http://www.w3.org/TR/WebIDL/#es-byte | 376 // http://www.w3.org/TR/WebIDL/#es-byte |
377 int8_t toInt8(v8::Handle<v8::Value>, IntegerConversionConfiguration, ExceptionSt
ate&); | 377 int8_t toInt8(v8::Isolate*, v8::Handle<v8::Value>, IntegerConversionConfiguratio
n, ExceptionState&); |
378 inline int8_t toInt8(v8::Handle<v8::Value> value, ExceptionState& exceptionState
) | 378 inline int8_t toInt8(v8::Isolate* isolate, v8::Handle<v8::Value> value, Exceptio
nState& exceptionState) |
379 { | 379 { |
380 return toInt8(value, NormalConversion, exceptionState); | 380 return toInt8(isolate, value, NormalConversion, exceptionState); |
381 } | 381 } |
382 | 382 |
383 // Convert a value to a 8-bit integer assuming the conversion cannot fail. | 383 // Convert a value to a 8-bit integer assuming the conversion cannot fail. |
384 int8_t toInt8(v8::Handle<v8::Value>); | 384 int8_t toInt8(v8::Isolate*, v8::Handle<v8::Value>); |
385 | 385 |
386 // Convert a value to a 8-bit unsigned integer. The conversion fails if the | 386 // Convert a value to a 8-bit unsigned integer. The conversion fails if the |
387 // value cannot be converted to a number or the range violated per WebIDL: | 387 // value cannot be converted to a number or the range violated per WebIDL: |
388 // http://www.w3.org/TR/WebIDL/#es-octet | 388 // http://www.w3.org/TR/WebIDL/#es-octet |
389 uint8_t toUInt8(v8::Handle<v8::Value>, IntegerConversionConfiguration, Exception
State&); | 389 uint8_t toUInt8(v8::Isolate*, v8::Handle<v8::Value>, IntegerConversionConfigurat
ion, ExceptionState&); |
390 inline uint8_t toUInt8(v8::Handle<v8::Value> value, ExceptionState& exceptionSta
te) | 390 inline uint8_t toUInt8(v8::Isolate* isolate, v8::Handle<v8::Value> value, Except
ionState& exceptionState) |
391 { | 391 { |
392 return toUInt8(value, NormalConversion, exceptionState); | 392 return toUInt8(isolate, value, NormalConversion, exceptionState); |
393 } | 393 } |
394 | 394 |
395 // Convert a value to a 8-bit unsigned integer assuming the conversion cannot fa
il. | 395 // Convert a value to a 8-bit unsigned integer assuming the conversion cannot fa
il. |
396 uint8_t toUInt8(v8::Handle<v8::Value>); | 396 uint8_t toUInt8(v8::Isolate*, v8::Handle<v8::Value>); |
397 | 397 |
398 // Convert a value to a 16-bit signed integer. The conversion fails if the | 398 // Convert a value to a 16-bit signed integer. The conversion fails if the |
399 // value cannot be converted to a number or the range violated per WebIDL: | 399 // value cannot be converted to a number or the range violated per WebIDL: |
400 // http://www.w3.org/TR/WebIDL/#es-short | 400 // http://www.w3.org/TR/WebIDL/#es-short |
401 int16_t toInt16(v8::Handle<v8::Value>, IntegerConversionConfiguration, Exception
State&); | 401 int16_t toInt16(v8::Isolate*, v8::Handle<v8::Value>, IntegerConversionConfigurat
ion, ExceptionState&); |
402 inline int16_t toInt16(v8::Handle<v8::Value> value, ExceptionState& exceptionSta
te) | 402 inline int16_t toInt16(v8::Isolate* isolate, v8::Handle<v8::Value> value, Except
ionState& exceptionState) |
403 { | 403 { |
404 return toInt16(value, NormalConversion, exceptionState); | 404 return toInt16(isolate, value, NormalConversion, exceptionState); |
405 } | 405 } |
406 | 406 |
407 // Convert a value to a 16-bit integer assuming the conversion cannot fail. | 407 // Convert a value to a 16-bit integer assuming the conversion cannot fail. |
408 int16_t toInt16(v8::Handle<v8::Value>); | 408 int16_t toInt16(v8::Isolate*, v8::Handle<v8::Value>); |
409 | 409 |
410 // Convert a value to a 16-bit unsigned integer. The conversion fails if the | 410 // Convert a value to a 16-bit unsigned integer. The conversion fails if the |
411 // value cannot be converted to a number or the range violated per WebIDL: | 411 // value cannot be converted to a number or the range violated per WebIDL: |
412 // http://www.w3.org/TR/WebIDL/#es-unsigned-short | 412 // http://www.w3.org/TR/WebIDL/#es-unsigned-short |
413 uint16_t toUInt16(v8::Handle<v8::Value>, IntegerConversionConfiguration, Excepti
onState&); | 413 uint16_t toUInt16(v8::Isolate*, v8::Handle<v8::Value>, IntegerConversionConfigur
ation, ExceptionState&); |
414 inline uint16_t toUInt16(v8::Handle<v8::Value> value, ExceptionState& exceptionS
tate) | 414 inline uint16_t toUInt16(v8::Isolate* isolate, v8::Handle<v8::Value> value, Exce
ptionState& exceptionState) |
415 { | 415 { |
416 return toUInt16(value, NormalConversion, exceptionState); | 416 return toUInt16(isolate, value, NormalConversion, exceptionState); |
417 } | 417 } |
418 | 418 |
419 // Convert a value to a 16-bit unsigned integer assuming the conversion cannot f
ail. | 419 // Convert a value to a 16-bit unsigned integer assuming the conversion cannot f
ail. |
420 uint16_t toUInt16(v8::Handle<v8::Value>); | 420 uint16_t toUInt16(v8::Isolate*, v8::Handle<v8::Value>); |
421 | 421 |
422 | 422 |
423 CORE_EXPORT int32_t toInt32Slow(v8::Handle<v8::Value>, IntegerConversionConfigur
ation, ExceptionState&); | 423 CORE_EXPORT int32_t toInt32Slow(v8::Isolate*, v8::Handle<v8::Value>, IntegerConv
ersionConfiguration, ExceptionState&); |
424 | 424 |
425 // Convert a value to a 32-bit signed integer. The conversion fails if the | 425 // Convert a value to a 32-bit signed integer. The conversion fails if the |
426 // value cannot be converted to a number or the range violated per WebIDL: | 426 // value cannot be converted to a number or the range violated per WebIDL: |
427 // http://www.w3.org/TR/WebIDL/#es-long | 427 // http://www.w3.org/TR/WebIDL/#es-long |
428 inline int32_t toInt32(v8::Handle<v8::Value> value, IntegerConversionConfigurati
on configuration, ExceptionState& exceptionState) | 428 inline int32_t toInt32(v8::Isolate* isolate, v8::Handle<v8::Value> value, Intege
rConversionConfiguration configuration, ExceptionState& exceptionState) |
429 { | 429 { |
430 // Fast case. The value is already a 32-bit integer. | 430 // Fast case. The value is already a 32-bit integer. |
431 if (value->IsInt32()) | 431 if (value->IsInt32()) |
432 return value->Int32Value(); | 432 return value->Int32Value(); |
433 return toInt32Slow(value, configuration, exceptionState); | 433 return toInt32Slow(isolate, value, configuration, exceptionState); |
434 } | 434 } |
435 | 435 |
436 inline int32_t toInt32(v8::Handle<v8::Value> value, ExceptionState& exceptionSta
te) | 436 inline int32_t toInt32(v8::Isolate* isolate, v8::Handle<v8::Value> value, Except
ionState& exceptionState) |
437 { | 437 { |
438 return toInt32(value, NormalConversion, exceptionState); | 438 return toInt32(isolate, value, NormalConversion, exceptionState); |
439 } | 439 } |
440 | 440 |
441 // Convert a value to a 32-bit integer assuming the conversion cannot fail. | 441 // Convert a value to a 32-bit integer assuming the conversion cannot fail. |
442 int32_t toInt32(v8::Handle<v8::Value>); | 442 int32_t toInt32(v8::Isolate*, v8::Handle<v8::Value>); |
443 | 443 |
444 // Convert a value to a 32-bit unsigned integer. The conversion fails if the | 444 // Convert a value to a 32-bit unsigned integer. The conversion fails if the |
445 // value cannot be converted to a number or the range violated per WebIDL: | 445 // value cannot be converted to a number or the range violated per WebIDL: |
446 // http://www.w3.org/TR/WebIDL/#es-unsigned-long | 446 // http://www.w3.org/TR/WebIDL/#es-unsigned-long |
447 CORE_EXPORT uint32_t toUInt32Slow(v8::Handle<v8::Value>, IntegerConversionConfig
uration, ExceptionState&); | 447 CORE_EXPORT uint32_t toUInt32Slow(v8::Isolate*, v8::Handle<v8::Value>, IntegerCo
nversionConfiguration, ExceptionState&); |
448 inline uint32_t toUInt32(v8::Handle<v8::Value> value, IntegerConversionConfigura
tion configuration, ExceptionState& exceptionState) | 448 inline uint32_t toUInt32(v8::Isolate* isolate, v8::Handle<v8::Value> value, Inte
gerConversionConfiguration configuration, ExceptionState& exceptionState) |
449 { | 449 { |
450 // Fast case. The value is already a 32-bit unsigned integer. | 450 // Fast case. The value is already a 32-bit unsigned integer. |
451 if (value->IsUint32()) | 451 if (value->IsUint32()) |
452 return value->Uint32Value(); | 452 return value->Uint32Value(); |
453 | 453 |
454 // Fast case. The value is a 32-bit signed integer with NormalConversion con
figuration. | 454 // Fast case. The value is a 32-bit signed integer with NormalConversion con
figuration. |
455 if (value->IsInt32() && configuration == NormalConversion) | 455 if (value->IsInt32() && configuration == NormalConversion) |
456 return value->Int32Value(); | 456 return value->Int32Value(); |
457 | 457 |
458 return toUInt32Slow(value, configuration, exceptionState); | 458 return toUInt32Slow(isolate, value, configuration, exceptionState); |
459 } | 459 } |
460 | 460 |
461 inline uint32_t toUInt32(v8::Handle<v8::Value> value, ExceptionState& exceptionS
tate) | 461 inline uint32_t toUInt32(v8::Isolate* isolate, v8::Handle<v8::Value> value, Exce
ptionState& exceptionState) |
462 { | 462 { |
463 return toUInt32(value, NormalConversion, exceptionState); | 463 return toUInt32(isolate, value, NormalConversion, exceptionState); |
464 } | 464 } |
465 | 465 |
466 // Convert a value to a 32-bit unsigned integer assuming the conversion cannot f
ail. | 466 // Convert a value to a 32-bit unsigned integer assuming the conversion cannot f
ail. |
467 uint32_t toUInt32(v8::Handle<v8::Value>); | 467 uint32_t toUInt32(v8::Isolate*, v8::Handle<v8::Value>); |
468 | 468 |
469 CORE_EXPORT int64_t toInt64Slow(v8::Handle<v8::Value>, IntegerConversionConfigur
ation, ExceptionState&); | 469 CORE_EXPORT int64_t toInt64Slow(v8::Isolate*, v8::Handle<v8::Value>, IntegerConv
ersionConfiguration, ExceptionState&); |
470 | 470 |
471 // Convert a value to a 64-bit signed integer. The conversion fails if the | 471 // Convert a value to a 64-bit signed integer. The conversion fails if the |
472 // value cannot be converted to a number or the range violated per WebIDL: | 472 // value cannot be converted to a number or the range violated per WebIDL: |
473 // http://www.w3.org/TR/WebIDL/#es-long-long | 473 // http://www.w3.org/TR/WebIDL/#es-long-long |
474 inline int64_t toInt64(v8::Handle<v8::Value> value, IntegerConversionConfigurati
on configuration, ExceptionState& exceptionState) | 474 inline int64_t toInt64(v8::Isolate* isolate, v8::Handle<v8::Value> value, Intege
rConversionConfiguration configuration, ExceptionState& exceptionState) |
475 { | 475 { |
476 // Clamping not supported for int64_t/long long int. See Source/wtf/MathExtr
as.h. | 476 // Clamping not supported for int64_t/long long int. See Source/wtf/MathExtr
as.h. |
477 ASSERT(configuration != Clamp); | 477 ASSERT(configuration != Clamp); |
478 | 478 |
479 // Fast case. The value is a 32-bit integer. | 479 // Fast case. The value is a 32-bit integer. |
480 if (value->IsInt32()) | 480 if (value->IsInt32()) |
481 return value->Int32Value(); | 481 return value->Int32Value(); |
482 | 482 |
483 return toInt64Slow(value, configuration, exceptionState); | 483 return toInt64Slow(isolate, value, configuration, exceptionState); |
484 } | 484 } |
485 | 485 |
486 inline int64_t toInt64(v8::Handle<v8::Value> value, ExceptionState& exceptionSta
te) | 486 inline int64_t toInt64(v8::Isolate* isolate, v8::Handle<v8::Value> value, Except
ionState& exceptionState) |
487 { | 487 { |
488 return toInt64(value, NormalConversion, exceptionState); | 488 return toInt64(isolate, value, NormalConversion, exceptionState); |
489 } | 489 } |
490 | 490 |
491 // Convert a value to a 64-bit integer assuming the conversion cannot fail. | 491 // Convert a value to a 64-bit integer assuming the conversion cannot fail. |
492 int64_t toInt64(v8::Handle<v8::Value>); | 492 int64_t toInt64(v8::Isolate*, v8::Handle<v8::Value>); |
493 | 493 |
494 CORE_EXPORT uint64_t toUInt64Slow(v8::Handle<v8::Value>, IntegerConversionConfig
uration, ExceptionState&); | 494 CORE_EXPORT uint64_t toUInt64Slow(v8::Isolate*, v8::Handle<v8::Value>, IntegerCo
nversionConfiguration, ExceptionState&); |
495 | 495 |
496 // Convert a value to a 64-bit unsigned integer. The conversion fails if the | 496 // Convert a value to a 64-bit unsigned integer. The conversion fails if the |
497 // value cannot be converted to a number or the range violated per WebIDL: | 497 // value cannot be converted to a number or the range violated per WebIDL: |
498 // http://www.w3.org/TR/WebIDL/#es-unsigned-long-long | 498 // http://www.w3.org/TR/WebIDL/#es-unsigned-long-long |
499 inline uint64_t toUInt64(v8::Handle<v8::Value> value, IntegerConversionConfigura
tion configuration, ExceptionState& exceptionState) | 499 inline uint64_t toUInt64(v8::Isolate* isolate, v8::Handle<v8::Value> value, Inte
gerConversionConfiguration configuration, ExceptionState& exceptionState) |
500 { | 500 { |
501 // Fast case. The value is a 32-bit unsigned integer. | 501 // Fast case. The value is a 32-bit unsigned integer. |
502 if (value->IsUint32()) | 502 if (value->IsUint32()) |
503 return value->Uint32Value(); | 503 return value->Uint32Value(); |
504 | 504 |
505 if (value->IsInt32() && configuration == NormalConversion) | 505 if (value->IsInt32() && configuration == NormalConversion) |
506 return value->Int32Value(); | 506 return value->Int32Value(); |
507 | 507 |
508 return toUInt64Slow(value, configuration, exceptionState); | 508 return toUInt64Slow(isolate, value, configuration, exceptionState); |
509 } | 509 } |
510 | 510 |
511 inline uint64_t toUInt64(v8::Handle<v8::Value> value, ExceptionState& exceptionS
tate) | 511 inline uint64_t toUInt64(v8::Isolate* isolate, v8::Handle<v8::Value> value, Exce
ptionState& exceptionState) |
512 { | 512 { |
513 return toUInt64(value, NormalConversion, exceptionState); | 513 return toUInt64(isolate, value, NormalConversion, exceptionState); |
514 } | 514 } |
515 | 515 |
516 // Convert a value to a 64-bit unsigned integer assuming the conversion cannot f
ail. | 516 // Convert a value to a 64-bit unsigned integer assuming the conversion cannot f
ail. |
517 uint64_t toUInt64(v8::Handle<v8::Value>); | 517 uint64_t toUInt64(v8::Isolate*, v8::Handle<v8::Value>); |
518 | 518 |
519 // Convert a value to a double precision float, which might fail. | 519 // Convert a value to a double precision float, which might fail. |
520 CORE_EXPORT double toDoubleSlow(v8::Handle<v8::Value>, ExceptionState&); | 520 CORE_EXPORT double toDoubleSlow(v8::Isolate*, v8::Handle<v8::Value>, ExceptionSt
ate&); |
521 | 521 |
522 inline double toDouble(v8::Handle<v8::Value> value, ExceptionState& exceptionSta
te) | 522 inline double toDouble(v8::Isolate* isolate, v8::Handle<v8::Value> value, Except
ionState& exceptionState) |
523 { | 523 { |
524 if (value->IsNumber()) | 524 if (value->IsNumber()) |
525 return value->NumberValue(); | 525 return value->NumberValue(); |
526 return toDoubleSlow(value, exceptionState); | 526 return toDoubleSlow(isolate, value, exceptionState); |
527 } | 527 } |
528 | 528 |
529 // Convert a value to a double precision float, throwing on non-finite values. | 529 // Convert a value to a double precision float, throwing on non-finite values. |
530 CORE_EXPORT double toRestrictedDouble(v8::Handle<v8::Value>, ExceptionState&); | 530 CORE_EXPORT double toRestrictedDouble(v8::Isolate*, v8::Handle<v8::Value>, Excep
tionState&); |
531 | 531 |
532 // Convert a value to a single precision float, which might fail. | 532 // Convert a value to a single precision float, which might fail. |
533 inline float toFloat(v8::Handle<v8::Value> value, ExceptionState& exceptionState
) | 533 inline float toFloat(v8::Isolate* isolate, v8::Handle<v8::Value> value, Exceptio
nState& exceptionState) |
534 { | 534 { |
535 return static_cast<float>(toDouble(value, exceptionState)); | 535 return static_cast<float>(toDouble(isolate, value, exceptionState)); |
536 } | 536 } |
537 | 537 |
538 // Convert a value to a single precision float, throwing on non-finite values. | 538 // Convert a value to a single precision float, throwing on non-finite values. |
539 CORE_EXPORT float toRestrictedFloat(v8::Handle<v8::Value>, ExceptionState&); | 539 CORE_EXPORT float toRestrictedFloat(v8::Isolate*, v8::Handle<v8::Value>, Excepti
onState&); |
540 | 540 |
541 // Converts a value to a String, throwing if any code unit is outside 0-255. | 541 // Converts a value to a String, throwing if any code unit is outside 0-255. |
542 CORE_EXPORT String toByteString(v8::Handle<v8::Value>, ExceptionState&); | 542 CORE_EXPORT String toByteString(v8::Isolate*, v8::Handle<v8::Value>, ExceptionSt
ate&); |
543 | 543 |
544 // Converts a value to a String, replacing unmatched UTF-16 surrogates with repl
acement characters. | 544 // Converts a value to a String, replacing unmatched UTF-16 surrogates with repl
acement characters. |
545 CORE_EXPORT String toUSVString(v8::Handle<v8::Value>, ExceptionState&); | 545 CORE_EXPORT String toUSVString(v8::Isolate*, v8::Handle<v8::Value>, ExceptionSta
te&); |
546 | 546 |
547 inline v8::Handle<v8::Boolean> v8Boolean(bool value, v8::Isolate* isolate) | 547 inline v8::Handle<v8::Boolean> v8Boolean(bool value, v8::Isolate* isolate) |
548 { | 548 { |
549 return value ? v8::True(isolate) : v8::False(isolate); | 549 return value ? v8::True(isolate) : v8::False(isolate); |
550 } | 550 } |
551 | 551 |
552 inline double toCoreDate(v8::Handle<v8::Value> object) | 552 inline double toCoreDate(v8::Isolate* isolate, v8::Handle<v8::Value> object) |
553 { | 553 { |
554 if (object->IsDate()) | 554 if (object->IsDate()) |
555 return v8::Handle<v8::Date>::Cast(object)->ValueOf(); | 555 return v8::Handle<v8::Date>::Cast(object)->ValueOf(); |
556 if (object->IsNumber()) | 556 if (object->IsNumber()) |
557 return object->NumberValue(); | 557 return object->NumberValue(); |
558 return std::numeric_limits<double>::quiet_NaN(); | 558 return std::numeric_limits<double>::quiet_NaN(); |
559 } | 559 } |
560 | 560 |
561 inline v8::Handle<v8::Value> v8DateOrNaN(double value, v8::Isolate* isolate) | 561 inline v8::Handle<v8::Value> v8DateOrNaN(double value, v8::Isolate* isolate) |
562 { | 562 { |
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
847 if (!stringValue.prepare(exceptionState)) | 847 if (!stringValue.prepare(exceptionState)) |
848 return String(); | 848 return String(); |
849 return stringValue; | 849 return stringValue; |
850 } | 850 } |
851 }; | 851 }; |
852 | 852 |
853 template<> | 853 template<> |
854 struct NativeValueTraits<int> { | 854 struct NativeValueTraits<int> { |
855 static inline int nativeValue(const v8::Local<v8::Value>& value, v8::Isolate
* isolate, ExceptionState& exceptionState) | 855 static inline int nativeValue(const v8::Local<v8::Value>& value, v8::Isolate
* isolate, ExceptionState& exceptionState) |
856 { | 856 { |
857 return toInt32(value, exceptionState); | 857 return toInt32(isolate, value, exceptionState); |
858 } | 858 } |
859 }; | 859 }; |
860 | 860 |
861 template<> | 861 template<> |
862 struct NativeValueTraits<unsigned> { | 862 struct NativeValueTraits<unsigned> { |
863 static inline unsigned nativeValue(const v8::Local<v8::Value>& value, v8::Is
olate* isolate, ExceptionState& exceptionState) | 863 static inline unsigned nativeValue(const v8::Local<v8::Value>& value, v8::Is
olate* isolate, ExceptionState& exceptionState) |
864 { | 864 { |
865 return toUInt32(value, exceptionState); | 865 return toUInt32(isolate, value, exceptionState); |
866 } | 866 } |
867 }; | 867 }; |
868 | 868 |
869 template<> | 869 template<> |
870 struct NativeValueTraits<float> { | 870 struct NativeValueTraits<float> { |
871 static inline float nativeValue(const v8::Local<v8::Value>& value, v8::Isola
te* isolate, ExceptionState& exceptionState) | 871 static inline float nativeValue(const v8::Local<v8::Value>& value, v8::Isola
te* isolate, ExceptionState& exceptionState) |
872 { | 872 { |
873 return toFloat(value, exceptionState); | 873 return toFloat(isolate, value, exceptionState); |
874 } | 874 } |
875 }; | 875 }; |
876 | 876 |
877 template<> | 877 template<> |
878 struct NativeValueTraits<double> { | 878 struct NativeValueTraits<double> { |
879 static inline double nativeValue(const v8::Local<v8::Value>& value, v8::Isol
ate* isolate, ExceptionState& exceptionState) | 879 static inline double nativeValue(const v8::Local<v8::Value>& value, v8::Isol
ate* isolate, ExceptionState& exceptionState) |
880 { | 880 { |
881 return toDouble(value, exceptionState); | 881 return toDouble(isolate, value, exceptionState); |
882 } | 882 } |
883 }; | 883 }; |
884 | 884 |
885 template<> | 885 template<> |
886 struct NativeValueTraits<v8::Local<v8::Value>> { | 886 struct NativeValueTraits<v8::Local<v8::Value>> { |
887 static inline v8::Local<v8::Value> nativeValue(const v8::Local<v8::Value>& v
alue, v8::Isolate* isolate, ExceptionState&) | 887 static inline v8::Local<v8::Value> nativeValue(const v8::Local<v8::Value>& v
alue, v8::Isolate* isolate, ExceptionState&) |
888 { | 888 { |
889 return value; | 889 return value; |
890 } | 890 } |
891 }; | 891 }; |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1059 | 1059 |
1060 // Callback functions used by generated code. | 1060 // Callback functions used by generated code. |
1061 void v8ConstructorAttributeGetterAsProperty(v8::Local<v8::String> propertyName,
const v8::PropertyCallbackInfo<v8::Value>&); | 1061 void v8ConstructorAttributeGetterAsProperty(v8::Local<v8::String> propertyName,
const v8::PropertyCallbackInfo<v8::Value>&); |
1062 void v8ConstructorAttributeGetterAsAccessor(const v8::FunctionCallbackInfo<v8::V
alue>&); | 1062 void v8ConstructorAttributeGetterAsAccessor(const v8::FunctionCallbackInfo<v8::V
alue>&); |
1063 | 1063 |
1064 typedef void (*InstallTemplateFunction)(v8::Local<v8::FunctionTemplate>, v8::Iso
late*); | 1064 typedef void (*InstallTemplateFunction)(v8::Local<v8::FunctionTemplate>, v8::Iso
late*); |
1065 | 1065 |
1066 } // namespace blink | 1066 } // namespace blink |
1067 | 1067 |
1068 #endif // V8Binding_h | 1068 #endif // V8Binding_h |
OLD | NEW |