Changeset 151550 in webkit


Ignore:
Timestamp:
Jun 13, 2013 9:12:51 AM (11 years ago)
Author:
Christophe Dumez
Message:

Avoid duplicate isInt32() / isUInt32() checks in JSDOMBindings
https://bugs.webkit.org/show_bug.cgi?id=117593

Reviewed by Geoffrey Garen.

Avoid duplicate isInt32() / isUInt32() checks in JSDOMBindings by
calling asInt32() / asUInt32() instead of toInt32() / toUInt32()
when we already know the value is a int32 / uint32.

No new tests, no behavior change.

  • bindings/js/JSDOMBinding.cpp:
Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r151549 r151550  
     12013-06-13  Christophe Dumez  <ch.dumez@sisa.samsung.com>
     2
     3        Avoid duplicate isInt32() / isUInt32() checks in JSDOMBindings
     4        https://bugs.webkit.org/show_bug.cgi?id=117593
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        Avoid duplicate isInt32() / isUInt32() checks in JSDOMBindings by
     9        calling asInt32() / asUInt32() instead of toInt32() / toUInt32()
     10        when we already know the value is a int32 / uint32.
     11
     12        No new tests, no behavior change.
     13
     14        * bindings/js/JSDOMBinding.cpp:
     15
    1162013-06-13  Yuki Sekiguchi  <yuki.sekiguchi@access-company.com>
    217
  • trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp

    r149131 r151550  
    310310{
    311311    if (value.isInt32())
    312         return value.toInt32(exec);
     312        return value.asInt32();
    313313
    314314    double x = value.toNumber(exec);
     
    322322{
    323323    if (value.isUInt32())
    324         return value.toUInt32(exec);
     324        return value.asUInt32();
    325325
    326326    double x = value.toNumber(exec);
     
    334334{
    335335    if (value.isInt32())
    336         return value.toInt32(exec);
     336        return value.asInt32();
    337337
    338338    double x = value.toNumber(exec);
     
    353353{
    354354    if (value.isUInt32())
    355         return value.toUInt32(exec);
     355        return value.asUInt32();
    356356
    357357    double x = value.toNumber(exec);
Note: See TracChangeset for help on using the changeset viewer.