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

Changeset 246365 in webkit


Ignore:
Timestamp:
Jun 12, 2019, 11:16:10 AM (7 years ago)
Author:
Alan Coon
Message:

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

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.3.1.2-branch/Source/JavaScriptCore
Files:
2 edited

Legend:

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

    r246364 r246365  
     12019-06-12  Alan Coon  <alancoon@apple.com>
     2
     3        Cherry-pick r246084. rdar://problem/51670920
     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  Alan Coon  <alancoon@apple.com>
    222
  • branches/safari-607.3.1.2-branch/Source/JavaScriptCore/runtime/JSObject.cpp

    r246364 r246365  
    28632863{
    28642864    VM& vm = exec->vm();
     2865    auto scope = DECLARE_THROW_SCOPE(vm);
    28652866
    28662867    RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(!isCopyOnWrite(indexingMode()));
     
    28722873    case ALL_BLANK_INDEXING_TYPES: {
    28732874        if (indexingShouldBeSparse(vm)) {
    2874             return putByIndexBeyondVectorLengthWithArrayStorage(
     2875            RELEASE_AND_RETURN(scope, putByIndexBeyondVectorLengthWithArrayStorage(
    28752876                exec, i, value, shouldThrow,
    2876                 ensureArrayStorageExistsAndEnterDictionaryIndexingMode(vm));
     2877                ensureArrayStorageExistsAndEnterDictionaryIndexingMode(vm)));
    28772878        }
    28782879        if (indexIsSufficientlyBeyondLengthForSparseMap(i, 0) || i >= MIN_SPARSE_ARRAY_INDEX) {
    2879             return putByIndexBeyondVectorLengthWithArrayStorage(
    2880                 exec, i, value, shouldThrow, createArrayStorage(vm, 0, 0));
     2880            RELEASE_AND_RETURN(scope, putByIndexBeyondVectorLengthWithArrayStorage(exec, i, value, shouldThrow, createArrayStorage(vm, 0, 0)));
    28812881        }
    28822882        if (needsSlowPutIndexing(vm)) {
    28832883            // Convert the indexing type to the SlowPutArrayStorage and retry.
    28842884            createArrayStorage(vm, i + 1, getNewVectorLength(vm, 0, 0, 0, i + 1));
    2885             return putByIndex(this, exec, i, value, shouldThrow);
     2885            RELEASE_AND_RETURN(scope, putByIndex(this, exec, i, value, shouldThrow));
    28862886        }
    28872887       
     
    28962896       
    28972897    case ALL_INT32_INDEXING_TYPES:
    2898         return putByIndexBeyondVectorLengthWithoutAttributes<Int32Shape>(exec, i, value);
     2898        RELEASE_AND_RETURN(scope, putByIndexBeyondVectorLengthWithoutAttributes<Int32Shape>(exec, i, value));
    28992899       
    29002900    case ALL_DOUBLE_INDEXING_TYPES:
    2901         return putByIndexBeyondVectorLengthWithoutAttributes<DoubleShape>(exec, i, value);
     2901        RELEASE_AND_RETURN(scope, putByIndexBeyondVectorLengthWithoutAttributes<DoubleShape>(exec, i, value));
    29022902       
    29032903    case ALL_CONTIGUOUS_INDEXING_TYPES:
    2904         return putByIndexBeyondVectorLengthWithoutAttributes<ContiguousShape>(exec, i, value);
     2904        RELEASE_AND_RETURN(scope, putByIndexBeyondVectorLengthWithoutAttributes<ContiguousShape>(exec, i, value));
    29052905       
    29062906    case NonArrayWithSlowPutArrayStorage:
    29072907    case ArrayWithSlowPutArrayStorage: {
    29082908        // No own property present in the vector, but there might be in the sparse map!
    2909         auto scope = DECLARE_THROW_SCOPE(vm);
    29102909        SparseArrayValueMap* map = arrayStorage()->m_sparseMap.get();
    29112910        bool putResult = false;
     
    29162915                return putResult;
    29172916        }
    2918         scope.release();
    29192917        FALLTHROUGH;
    29202918    }
     
    29222920    case NonArrayWithArrayStorage:
    29232921    case ArrayWithArrayStorage:
    2924         return putByIndexBeyondVectorLengthWithArrayStorage(exec, i, value, shouldThrow, arrayStorage());
     2922        RELEASE_AND_RETURN(scope, putByIndexBeyondVectorLengthWithArrayStorage(exec, i, value, shouldThrow, arrayStorage()));
    29252923       
    29262924    default:
Note: See TracChangeset for help on using the changeset viewer.