Ignore:
Timestamp:
Feb 25, 2010, 4:22:34 PM (16 years ago)
Author:
[email protected]
Message:

Reviewed by Anders Carlsson.

https://bugs.webkit.org/show_bug.cgi?id=35406
<rdar://problem/6945502> Make generic array methods work with JavaArray

Test: java/array-sort.html

Made RuntimeArray inherit from JSArray, keeping the promise given in ClassInfo.

  • bridge/runtime_array.cpp: (JSC::RuntimeArray::RuntimeArray): (JSC::RuntimeArray::~RuntimeArray):
  • bridge/runtime_array.h: (JSC::RuntimeArray::classInfo): (JSC::RuntimeArray::getConcreteArray):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/RegExpMatchesArray.h

    r53170 r55262  
    3333        virtual bool getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
    3434        {
    35             if (lazyCreationData())
     35            if (subclassData())
    3636                fillArrayInstance(exec);
    3737            return JSArray::getOwnPropertySlot(exec, propertyName, slot);
     
    4040        virtual bool getOwnPropertySlot(ExecState* exec, unsigned propertyName, PropertySlot& slot)
    4141        {
    42             if (lazyCreationData())
     42            if (subclassData())
    4343                fillArrayInstance(exec);
    4444            return JSArray::getOwnPropertySlot(exec, propertyName, slot);
     
    4747        virtual bool getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
    4848        {
    49             if (lazyCreationData())
     49            if (subclassData())
    5050                fillArrayInstance(exec);
    5151            return JSArray::getOwnPropertyDescriptor(exec, propertyName, descriptor);
     
    5454        virtual void put(ExecState* exec, const Identifier& propertyName, JSValue v, PutPropertySlot& slot)
    5555        {
    56             if (lazyCreationData())
     56            if (subclassData())
    5757                fillArrayInstance(exec);
    5858            JSArray::put(exec, propertyName, v, slot);
     
    6161        virtual void put(ExecState* exec, unsigned propertyName, JSValue v)
    6262        {
    63             if (lazyCreationData())
     63            if (subclassData())
    6464                fillArrayInstance(exec);
    6565            JSArray::put(exec, propertyName, v);
     
    6868        virtual bool deleteProperty(ExecState* exec, const Identifier& propertyName)
    6969        {
    70             if (lazyCreationData())
     70            if (subclassData())
    7171                fillArrayInstance(exec);
    7272            return JSArray::deleteProperty(exec, propertyName);
     
    7575        virtual bool deleteProperty(ExecState* exec, unsigned propertyName)
    7676        {
    77             if (lazyCreationData())
     77            if (subclassData())
    7878                fillArrayInstance(exec);
    7979            return JSArray::deleteProperty(exec, propertyName);
     
    8282        virtual void getOwnPropertyNames(ExecState* exec, PropertyNameArray& arr, EnumerationMode mode = ExcludeDontEnumProperties)
    8383        {
    84             if (lazyCreationData())
     84            if (subclassData())
    8585                fillArrayInstance(exec);
    8686            JSArray::getOwnPropertyNames(exec, arr, mode);
Note: See TracChangeset for help on using the changeset viewer.