Ignore:
Timestamp:
Aug 26, 2013, 1:29:06 PM (12 years ago)
Author:
[email protected]
Message:

JSObject::putDirectIndexBeyondVectorLengthWithArrayStorage does a check on the length of the ArrayStorage after possible reallocing it
https://bugs.webkit.org/show_bug.cgi?id=120278

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

  • runtime/JSObject.cpp:

(JSC::JSObject::putDirectIndexBeyondVectorLengthWithArrayStorage):

LayoutTests:

  • fast/js/put-direct-index-beyond-vector-length-resize-expected.txt: Added.
  • fast/js/put-direct-index-beyond-vector-length-resize.html: Added.
  • fast/js/script-tests/put-direct-index-beyond-vector-length-resize.js: Added.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/JSObject.cpp

    r154471 r154633  
    20582058                !attributes
    20592059                && (isDenseEnoughForVector(i, storage->m_numValuesInVector))
    2060                 && increaseVectorLength(vm, i + 1)
    2061                 && !indexIsSufficientlyBeyondLengthForSparseMap(i, storage->vectorLength()))) {
     2060                && !indexIsSufficientlyBeyondLengthForSparseMap(i, storage->vectorLength()))
     2061                && increaseVectorLength(vm, i + 1)) {
    20622062            // success! - reread m_storage since it has likely been reallocated, and store to the vector.
    20632063            storage = arrayStorage();
Note: See TracChangeset for help on using the changeset viewer.