Ignore:
Timestamp:
Dec 4, 2009, 5:21:45 PM (15 years ago)
Author:
[email protected]
Message:

2009-12-04 Kent Hansen <[email protected]>

Reviewed by Darin Adler.

JavaScript delete operator should return false for string properties
https://bugs.webkit.org/show_bug.cgi?id=32012

  • runtime/StringObject.cpp: (JSC::StringObject::deleteProperty):

2009-12-04 Kent Hansen <[email protected]>

Reviewed by Darin Adler.

Add test for JavaScript string property deletion
https://bugs.webkit.org/show_bug.cgi?id=32012

  • fast/js/script-tests/string-property-deletion.js: Added.
  • fast/js/string-property-deletion-expected.txt: Added.
  • fast/js/string-property-deletion.html: Added.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/StringObject.cpp

    r51671 r51724  
    8080    if (propertyName == exec->propertyNames().length)
    8181        return false;
     82    bool isStrictUInt32;
     83    unsigned i = propertyName.toStrictUInt32(&isStrictUInt32);
     84    if (isStrictUInt32 && internalValue()->canGetIndex(i))
     85        return false;
    8286    return JSObject::deleteProperty(exec, propertyName);
    8387}
Note: See TracChangeset for help on using the changeset viewer.