Changeset 105811 in webkit


Ignore:
Timestamp:
Jan 24, 2012 2:31:41 PM (12 years ago)
Author:
ggaren@apple.com
Message:

JSValue::toString() should return a JSString* instead of a UString
https://bugs.webkit.org/show_bug.cgi?id=76861

Source/JavaScriptCore:

Fixed two failing layout tests after my last patch.

Reviewed by Gavin Barraclough.

  • runtime/ArrayPrototype.cpp:

(JSC::arrayProtoFuncSort): Call value() after calling toString(), as
in all other cases.

I missed this case because the JSString* type has a valid operator<,
so the compiler didn't complain.

LayoutTests:

Reviewed by Gavin Barraclough.

Added a unit test for something I got wrong while writing this patch.

  • fast/js/add-to-primitive-expected.txt: Added.
  • fast/js/add-to-primitive.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r105802 r105811  
     12012-01-24  Geoffrey Garen  <ggaren@apple.com>
     2
     3        JSValue::toString() should return a JSString* instead of a UString
     4        https://bugs.webkit.org/show_bug.cgi?id=76861
     5
     6        Reviewed by Gavin Barraclough.
     7       
     8        Added a unit test for something I got wrong while writing this patch.
     9
     10        * fast/js/add-to-primitive-expected.txt: Added.
     11        * fast/js/add-to-primitive.html: Added.
     12
    1132012-01-24  Adam Barth  <abarth@webkit.org>
    214
  • trunk/Source/JavaScriptCore/ChangeLog

    r105705 r105811  
     12012-01-24  Geoffrey Garen  <ggaren@apple.com>
     2
     3        JSValue::toString() should return a JSString* instead of a UString
     4        https://bugs.webkit.org/show_bug.cgi?id=76861
     5
     6        Fixed two failing layout tests after my last patch.
     7
     8        Reviewed by Gavin Barraclough.
     9
     10        * runtime/ArrayPrototype.cpp:
     11        (JSC::arrayProtoFuncSort): Call value() after calling toString(), as
     12        in all other cases.
     13       
     14        I missed this case because the JSString* type has a valid operator<,
     15        so the compiler didn't complain.
     16
    1172012-01-24  Kenichi Ishibashi  <bashi@chromium.org>
    218
  • trunk/Source/JavaScriptCore/runtime/ArrayPrototype.cpp

    r105698 r105811  
    572572                compareResult = call(exec, function, callType, callData, jsUndefined(), l).toNumber(exec);
    573573            } else
    574                 compareResult = (jObj.toString(exec) < minObj.toString(exec)) ? -1 : 1;
     574                compareResult = (jObj.toString(exec)->value(exec) < minObj.toString(exec)->value(exec)) ? -1 : 1;
    575575
    576576            if (compareResult < 0) {
Note: See TracChangeset for help on using the changeset viewer.