Changeset 246084 in webkit
- Timestamp:
- Jun 4, 2019, 3:08:43 PM (7 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
runtime/JSObject.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r246075 r246084 1 2019-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 1 9 2019-06-04 Tadeu Zagallo <tzagallo@apple.com> 2 10 -
trunk/Source/JavaScriptCore/runtime/JSObject.cpp
r246040 r246084 2909 2909 { 2910 2910 VM& vm = exec->vm(); 2911 auto scope = DECLARE_THROW_SCOPE(vm); 2911 2912 2912 2913 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(!isCopyOnWrite(indexingMode())); … … 2918 2919 case ALL_BLANK_INDEXING_TYPES: { 2919 2920 if (indexingShouldBeSparse(vm)) { 2920 returnputByIndexBeyondVectorLengthWithArrayStorage(2921 RELEASE_AND_RETURN(scope, putByIndexBeyondVectorLengthWithArrayStorage( 2921 2922 exec, i, value, shouldThrow, 2922 ensureArrayStorageExistsAndEnterDictionaryIndexingMode(vm)) ;2923 ensureArrayStorageExistsAndEnterDictionaryIndexingMode(vm))); 2923 2924 } 2924 2925 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))); 2927 2927 } 2928 2928 if (needsSlowPutIndexing(vm)) { 2929 2929 // Convert the indexing type to the SlowPutArrayStorage and retry. 2930 2930 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)); 2932 2932 } 2933 2933 … … 2942 2942 2943 2943 case ALL_INT32_INDEXING_TYPES: 2944 return putByIndexBeyondVectorLengthWithoutAttributes<Int32Shape>(exec, i, value);2944 RELEASE_AND_RETURN(scope, putByIndexBeyondVectorLengthWithoutAttributes<Int32Shape>(exec, i, value)); 2945 2945 2946 2946 case ALL_DOUBLE_INDEXING_TYPES: 2947 return putByIndexBeyondVectorLengthWithoutAttributes<DoubleShape>(exec, i, value);2947 RELEASE_AND_RETURN(scope, putByIndexBeyondVectorLengthWithoutAttributes<DoubleShape>(exec, i, value)); 2948 2948 2949 2949 case ALL_CONTIGUOUS_INDEXING_TYPES: 2950 return putByIndexBeyondVectorLengthWithoutAttributes<ContiguousShape>(exec, i, value);2950 RELEASE_AND_RETURN(scope, putByIndexBeyondVectorLengthWithoutAttributes<ContiguousShape>(exec, i, value)); 2951 2951 2952 2952 case NonArrayWithSlowPutArrayStorage: 2953 2953 case ArrayWithSlowPutArrayStorage: { 2954 2954 // No own property present in the vector, but there might be in the sparse map! 2955 auto scope = DECLARE_THROW_SCOPE(vm);2956 2955 SparseArrayValueMap* map = arrayStorage()->m_sparseMap.get(); 2957 2956 bool putResult = false; … … 2962 2961 return putResult; 2963 2962 } 2964 scope.release();2965 2963 FALLTHROUGH; 2966 2964 } … … 2968 2966 case NonArrayWithArrayStorage: 2969 2967 case ArrayWithArrayStorage: 2970 return putByIndexBeyondVectorLengthWithArrayStorage(exec, i, value, shouldThrow, arrayStorage());2968 RELEASE_AND_RETURN(scope, putByIndexBeyondVectorLengthWithArrayStorage(exec, i, value, shouldThrow, arrayStorage())); 2971 2969 2972 2970 default:
Note:
See TracChangeset
for help on using the changeset viewer.