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

Changeset 246084 in webkit


Ignore:
Timestamp:
Jun 4, 2019, 3:08:43 PM (7 years ago)
Author:
ysuzuki@apple.com
Message:

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

  • runtime/JSObject.cpp:

(JSC::JSObject::putByIndexBeyondVectorLength):

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r246075 r246084  
     12019-06-04  Yusuke Suzuki  <ysuzuki@apple.com>
     2
     3        Unreviewed, update exception scope for putByIndexBeyondVectorLength
     4        https://bugs.webkit.org/show_bug.cgi?id=198477
     5
     6        * runtime/JSObject.cpp:
     7        (JSC::JSObject::putByIndexBeyondVectorLength):
     8
    192019-06-04  Tadeu Zagallo  <tzagallo@apple.com>
    210
  • trunk/Source/JavaScriptCore/runtime/JSObject.cpp

    r246040 r246084  
    29092909{
    29102910    VM& vm = exec->vm();
     2911    auto scope = DECLARE_THROW_SCOPE(vm);
    29112912
    29122913    RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(!isCopyOnWrite(indexingMode()));
     
    29182919    case ALL_BLANK_INDEXING_TYPES: {
    29192920        if (indexingShouldBeSparse(vm)) {
    2920             return putByIndexBeyondVectorLengthWithArrayStorage(
     2921            RELEASE_AND_RETURN(scope, putByIndexBeyondVectorLengthWithArrayStorage(
    29212922                exec, i, value, shouldThrow,
    2922                 ensureArrayStorageExistsAndEnterDictionaryIndexingMode(vm));
     2923                ensureArrayStorageExistsAndEnterDictionaryIndexingMode(vm)));
    29232924        }
    29242925        if (indexIsSufficientlyBeyondLengthForSparseMap(i, 0) || i >= MIN_SPARSE_ARRAY_INDEX) {
    2925             return putByIndexBeyondVectorLengthWithArrayStorage(
    2926                 exec, i, value, shouldThrow, createArrayStorage(vm, 0, 0));
     2926            RELEASE_AND_RETURN(scope, putByIndexBeyondVectorLengthWithArrayStorage(exec, i, value, shouldThrow, createArrayStorage(vm, 0, 0)));
    29272927        }
    29282928        if (needsSlowPutIndexing(vm)) {
    29292929            // Convert the indexing type to the SlowPutArrayStorage and retry.
    29302930            createArrayStorage(vm, i + 1, getNewVectorLength(vm, 0, 0, 0, i + 1));
    2931             return putByIndex(this, exec, i, value, shouldThrow);
     2931            RELEASE_AND_RETURN(scope, putByIndex(this, exec, i, value, shouldThrow));
    29322932        }
    29332933       
     
    29422942       
    29432943    case ALL_INT32_INDEXING_TYPES:
    2944         return putByIndexBeyondVectorLengthWithoutAttributes<Int32Shape>(exec, i, value);
     2944        RELEASE_AND_RETURN(scope, putByIndexBeyondVectorLengthWithoutAttributes<Int32Shape>(exec, i, value));
    29452945       
    29462946    case ALL_DOUBLE_INDEXING_TYPES:
    2947         return putByIndexBeyondVectorLengthWithoutAttributes<DoubleShape>(exec, i, value);
     2947        RELEASE_AND_RETURN(scope, putByIndexBeyondVectorLengthWithoutAttributes<DoubleShape>(exec, i, value));
    29482948       
    29492949    case ALL_CONTIGUOUS_INDEXING_TYPES:
    2950         return putByIndexBeyondVectorLengthWithoutAttributes<ContiguousShape>(exec, i, value);
     2950        RELEASE_AND_RETURN(scope, putByIndexBeyondVectorLengthWithoutAttributes<ContiguousShape>(exec, i, value));
    29512951       
    29522952    case NonArrayWithSlowPutArrayStorage:
    29532953    case ArrayWithSlowPutArrayStorage: {
    29542954        // No own property present in the vector, but there might be in the sparse map!
    2955         auto scope = DECLARE_THROW_SCOPE(vm);
    29562955        SparseArrayValueMap* map = arrayStorage()->m_sparseMap.get();
    29572956        bool putResult = false;
     
    29622961                return putResult;
    29632962        }
    2964         scope.release();
    29652963        FALLTHROUGH;
    29662964    }
     
    29682966    case NonArrayWithArrayStorage:
    29692967    case ArrayWithArrayStorage:
    2970         return putByIndexBeyondVectorLengthWithArrayStorage(exec, i, value, shouldThrow, arrayStorage());
     2968        RELEASE_AND_RETURN(scope, putByIndexBeyondVectorLengthWithArrayStorage(exec, i, value, shouldThrow, arrayStorage()));
    29712969       
    29722970    default:
Note: See TracChangeset for help on using the changeset viewer.