Changeset 51307 in webkit


Ignore:
Timestamp:
Nov 23, 2009 5:02:13 AM (14 years ago)
Author:
Simon Hausmann
Message:

[Symbian] Fix lastIndexOf() for Symbian
https://bugs.webkit.org/show_bug.cgi?id=31773

Patch by Laszlo Gombos <Laszlo Gombos> on 2009-11-23
Reviewed by Kenneth Rohde Christiansen.

Symbian soft floating point library has problems with operators
comparing NaN to numbers. Without a workaround lastIndexOf()
function does not work.

Patch developed by David Leong.

  • runtime/StringPrototype.cpp:

(JSC::stringProtoFuncLastIndexOf):Add an extra test
to check for NaN for Symbian.

Location:
trunk/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r51305 r51307  
     12009-11-23  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
     2
     3        Reviewed by Kenneth Rohde Christiansen.
     4
     5        [Symbian] Fix lastIndexOf() for Symbian
     6        https://bugs.webkit.org/show_bug.cgi?id=31773
     7
     8        Symbian soft floating point library has problems with operators
     9        comparing NaN to numbers. Without a workaround lastIndexOf()
     10        function does not work.
     11
     12        Patch developed by David Leong.
     13
     14        * runtime/StringPrototype.cpp:
     15        (JSC::stringProtoFuncLastIndexOf):Add an extra test
     16        to check for NaN for Symbian.
     17
    1182009-11-23  Steve Block  <steveblock@google.com>
    219
  • trunk/JavaScriptCore/runtime/StringPrototype.cpp

    r49423 r51307  
    470470    else if (!(dpos <= len)) // true for NaN
    471471        dpos = len;
     472#if PLATFORM(SYMBIAN)
     473    // Work around for broken NaN compare operator
     474    else if (isnan(dpos))
     475        dpos = len;
     476#endif
    472477    return jsNumber(exec, s.rfind(u2, static_cast<int>(dpos)));
    473478}
Note: See TracChangeset for help on using the changeset viewer.