⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 246380 in webkit


Ignore:
Timestamp:
Jun 12, 2019, 3:20:56 PM (7 years ago)
Author:
Kocsen Chung
Message:

Cherry-pick r246084. rdar://problem/51656856

Unreviewed, update exception scope for putByIndexBeyondVectorLength
https://bugs.webkit.org/show_bug.cgi?id=198477

  • runtime/JSObject.cpp: (JSC::JSObject::putByIndexBeyondVectorLength):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@246084 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Location:
branches/safari-607-branch/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-607-branch/Source/JavaScriptCore/ChangeLog

    r246379 r246380  
     12019-06-12  Null  <null@apple.com>
     2
     3        Cherry-pick r246084. rdar://problem/51656856
     4
     5    Unreviewed, update exception scope for putByIndexBeyondVectorLength
     6    https://bugs.webkit.org/show_bug.cgi?id=198477
     7   
     8    * runtime/JSObject.cpp:
     9    (JSC::JSObject::putByIndexBeyondVectorLength):
     10   
     11    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@246084 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     12
     13    2019-06-04  Yusuke Suzuki  <ysuzuki@apple.com>
     14
     15            Unreviewed, update exception scope for putByIndexBeyondVectorLength
     16            https://bugs.webkit.org/show_bug.cgi?id=198477
     17
     18            * runtime/JSObject.cpp:
     19            (JSC::JSObject::putByIndexBeyondVectorLength):
     20
    1212019-06-12  Null  <null@apple.com>
    222
  • branches/safari-607-branch/Source/JavaScriptCore/runtime/JSObject.cpp

    r246378 r246380  
    28692869{
    28702870    VM& vm = exec->vm();
     2871    auto scope = DECLARE_THROW_SCOPE(vm);
    28712872
    28722873    RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(!isCopyOnWrite(indexingMode()));
     
    28782879    case ALL_BLANK_INDEXING_TYPES: {
    28792880        if (indexingShouldBeSparse(vm)) {
    2880             return putByIndexBeyondVectorLengthWithArrayStorage(
     2881            RELEASE_AND_RETURN(scope, putByIndexBeyondVectorLengthWithArrayStorage(
    28812882                exec, i, value, shouldThrow,
    2882                 ensureArrayStorageExistsAndEnterDictionaryIndexingMode(vm));
     2883                ensureArrayStorageExistsAndEnterDictionaryIndexingMode(vm)));
    28832884        }
    28842885        if (indexIsSufficientlyBeyondLengthForSparseMap(i, 0) || i >= MIN_SPARSE_ARRAY_INDEX) {
    2885             return putByIndexBeyondVectorLengthWithArrayStorage(
    2886                 exec, i, value, shouldThrow, createArrayStorage(vm, 0, 0));
     2886            RELEASE_AND_RETURN(scope, putByIndexBeyondVectorLengthWithArrayStorage(exec, i, value, shouldThrow, createArrayStorage(vm, 0, 0)));
    28872887        }
    28882888        if (needsSlowPutIndexing(vm)) {
    28892889            // Convert the indexing type to the SlowPutArrayStorage and retry.
    28902890            createArrayStorage(vm, i + 1, getNewVectorLength(vm, 0, 0, 0, i + 1));
    2891             return putByIndex(this, exec, i, value, shouldThrow);
     2891            RELEASE_AND_RETURN(scope, putByIndex(this, exec, i, value, shouldThrow));
    28922892        }
    28932893       
     
    29022902       
    29032903    case ALL_INT32_INDEXING_TYPES:
    2904         return putByIndexBeyondVectorLengthWithoutAttributes<Int32Shape>(exec, i, value);
     2904        RELEASE_AND_RETURN(scope, putByIndexBeyondVectorLengthWithoutAttributes<Int32Shape>(exec, i, value));
    29052905       
    29062906    case ALL_DOUBLE_INDEXING_TYPES:
    2907         return putByIndexBeyondVectorLengthWithoutAttributes<DoubleShape>(exec, i, value);
     2907        RELEASE_AND_RETURN(scope, putByIndexBeyondVectorLengthWithoutAttributes<DoubleShape>(exec, i, value));
    29082908       
    29092909    case ALL_CONTIGUOUS_INDEXING_TYPES:
    2910         return putByIndexBeyondVectorLengthWithoutAttributes<ContiguousShape>(exec, i, value);
     2910        RELEASE_AND_RETURN(scope, putByIndexBeyondVectorLengthWithoutAttributes<ContiguousShape>(exec, i, value));
    29112911       
    29122912    case NonArrayWithSlowPutArrayStorage:
    29132913    case ArrayWithSlowPutArrayStorage: {
    29142914        // No own property present in the vector, but there might be in the sparse map!
    2915         auto scope = DECLARE_THROW_SCOPE(vm);
    29162915        SparseArrayValueMap* map = arrayStorage()->m_sparseMap.get();
    29172916        bool putResult = false;
     
    29222921                return putResult;
    29232922        }
    2924         scope.release();
    29252923        FALLTHROUGH;
    29262924    }
     
    29282926    case NonArrayWithArrayStorage:
    29292927    case ArrayWithArrayStorage:
    2930         return putByIndexBeyondVectorLengthWithArrayStorage(exec, i, value, shouldThrow, arrayStorage());
     2928        RELEASE_AND_RETURN(scope, putByIndexBeyondVectorLengthWithArrayStorage(exec, i, value, shouldThrow, arrayStorage()));
    29312929       
    29322930    default:
Note: See TracChangeset for help on using the changeset viewer.