Changeset 246365 in webkit
- Timestamp:
- Jun 12, 2019, 11:16:10 AM (7 years ago)
- Location:
- branches/safari-607.3.1.2-branch/Source/JavaScriptCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
runtime/JSObject.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-607.3.1.2-branch/Source/JavaScriptCore/ChangeLog
r246364 r246365 1 2019-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 1 21 2019-06-12 Alan Coon <alancoon@apple.com> 2 22 -
branches/safari-607.3.1.2-branch/Source/JavaScriptCore/runtime/JSObject.cpp
r246364 r246365 2863 2863 { 2864 2864 VM& vm = exec->vm(); 2865 auto scope = DECLARE_THROW_SCOPE(vm); 2865 2866 2866 2867 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(!isCopyOnWrite(indexingMode())); … … 2872 2873 case ALL_BLANK_INDEXING_TYPES: { 2873 2874 if (indexingShouldBeSparse(vm)) { 2874 returnputByIndexBeyondVectorLengthWithArrayStorage(2875 RELEASE_AND_RETURN(scope, putByIndexBeyondVectorLengthWithArrayStorage( 2875 2876 exec, i, value, shouldThrow, 2876 ensureArrayStorageExistsAndEnterDictionaryIndexingMode(vm)) ;2877 ensureArrayStorageExistsAndEnterDictionaryIndexingMode(vm))); 2877 2878 } 2878 2879 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))); 2881 2881 } 2882 2882 if (needsSlowPutIndexing(vm)) { 2883 2883 // Convert the indexing type to the SlowPutArrayStorage and retry. 2884 2884 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)); 2886 2886 } 2887 2887 … … 2896 2896 2897 2897 case ALL_INT32_INDEXING_TYPES: 2898 return putByIndexBeyondVectorLengthWithoutAttributes<Int32Shape>(exec, i, value);2898 RELEASE_AND_RETURN(scope, putByIndexBeyondVectorLengthWithoutAttributes<Int32Shape>(exec, i, value)); 2899 2899 2900 2900 case ALL_DOUBLE_INDEXING_TYPES: 2901 return putByIndexBeyondVectorLengthWithoutAttributes<DoubleShape>(exec, i, value);2901 RELEASE_AND_RETURN(scope, putByIndexBeyondVectorLengthWithoutAttributes<DoubleShape>(exec, i, value)); 2902 2902 2903 2903 case ALL_CONTIGUOUS_INDEXING_TYPES: 2904 return putByIndexBeyondVectorLengthWithoutAttributes<ContiguousShape>(exec, i, value);2904 RELEASE_AND_RETURN(scope, putByIndexBeyondVectorLengthWithoutAttributes<ContiguousShape>(exec, i, value)); 2905 2905 2906 2906 case NonArrayWithSlowPutArrayStorage: 2907 2907 case ArrayWithSlowPutArrayStorage: { 2908 2908 // No own property present in the vector, but there might be in the sparse map! 2909 auto scope = DECLARE_THROW_SCOPE(vm);2910 2909 SparseArrayValueMap* map = arrayStorage()->m_sparseMap.get(); 2911 2910 bool putResult = false; … … 2916 2915 return putResult; 2917 2916 } 2918 scope.release();2919 2917 FALLTHROUGH; 2920 2918 } … … 2922 2920 case NonArrayWithArrayStorage: 2923 2921 case ArrayWithArrayStorage: 2924 return putByIndexBeyondVectorLengthWithArrayStorage(exec, i, value, shouldThrow, arrayStorage());2922 RELEASE_AND_RETURN(scope, putByIndexBeyondVectorLengthWithArrayStorage(exec, i, value, shouldThrow, arrayStorage())); 2925 2923 2926 2924 default:
Note:
See TracChangeset
for help on using the changeset viewer.