Changeset 51307 in webkit for trunk/JavaScriptCore/runtime


Ignore:
Timestamp:
Nov 23, 2009, 5:02:13 AM (16 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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.