Skip to content
  • barraclough@apple.com's avatar
    https://bugs.webkit.org/show_bug.cgi?id=97530 · fb498f4b
    barraclough@apple.com authored
    Regression, freeze applied to numeric properties of non-array objects
    
    Reviewed by Filip Pizlo.
    
    Object.freeze has a fast implementation in JSObject, but this hasn't been updated to take into account numeric properties in butterflies.
    For now, just fall back to the generic implementation if the object has numeric properties.
    
    Source/JavaScriptCore: 
    
    * runtime/ObjectConstructor.cpp:
    (JSC::objectConstructorFreeze):
        - fallback if the object has a non-zero indexed property vector length.
    
    LayoutTests: 
    
    * fast/js/preventExtensions-expected.txt:
    * fast/js/script-tests/preventExtensions.js:
        - Added a test case for freezing an object with a numeric property.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129461 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    fb498f4b