Ignore:
Timestamp:
Jul 14, 2005, 10:24:31 AM (20 years ago)
Author:
ggaren
Message:

JavaScriptCore:

-landed fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=3412
Object.prototype is missing toLocaleString

-layout test info in webcore changelog

Reviewed by mjs.

  • kjs/object_object.cpp: (ObjectPrototypeImp::ObjectPrototypeImp): (ObjectProtoFuncImp::call):
  • kjs/object_object.h: (KJS::ObjectProtoFuncImp::):

WebCore:

-landed layout test for http://bugzilla.opendarwin.org/show_bug.cgi?id=3412
Object.prototype is missing toLocaleString

Reviewed by mjs.

Test cases added:

  • layout-tests/fast/js/object-prototype-toLocaleString-expected.txt: Added.
  • layout-tests/fast/js/object-prototype-toLocaleString.html: Added.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/object_object.cpp

    r9582 r9758  
    3939{
    4040    Value protect(this);
    41     putDirect(toStringPropertyName, new ObjectProtoFuncImp(exec,funcProto,ObjectProtoFuncImp::ToString,  0), DontEnum);
    42     putDirect(valueOfPropertyName,  new ObjectProtoFuncImp(exec,funcProto,ObjectProtoFuncImp::ValueOf,   0), DontEnum);
    43     putDirect("hasOwnProperty", new ObjectProtoFuncImp(exec,funcProto,ObjectProtoFuncImp::HasOwnProperty,1), DontEnum);
     41    putDirect(toStringPropertyName, new ObjectProtoFuncImp(exec,funcProto,ObjectProtoFuncImp::ToString,            0), DontEnum);
     42    putDirect(toLocaleStringPropertyName, new ObjectProtoFuncImp(exec,funcProto,ObjectProtoFuncImp::ToLocaleString,0), DontEnum);
     43    putDirect(valueOfPropertyName,  new ObjectProtoFuncImp(exec,funcProto,ObjectProtoFuncImp::ValueOf,             0), DontEnum);
     44    putDirect("hasOwnProperty", new ObjectProtoFuncImp(exec,funcProto,ObjectProtoFuncImp::HasOwnProperty,          1), DontEnum);
    4445}
    4546
     
    7576            return Value(exists ? BooleanImp::staticTrue : BooleanImp::staticFalse);
    7677        }
     78        case ToLocaleString:
     79          return thisObj.imp()->toString(exec);
    7780        case ToString:
    7881        default:
Note: See TracChangeset for help on using the changeset viewer.