Fix arkuix bug

Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/IB475Y?from=project-issue
Signed-off-by: 刘智杰 <liuzhijie9@huawei.com>
Change-Id: I378acc0c1162938fcec8385f95d291a5ce3354f2
This commit is contained in:
刘智杰 2024-11-14 09:16:45 +08:00
parent d5527468e1
commit f6b5e9ed3d

View File

@ -1732,7 +1732,7 @@ JSTaggedValue JSStableArray::CopySortedListToReceiver(JSThread *thread, const JS
// 8. Repeat, while j < itemCount,
// a. Perform ! Set(obj, ! ToString((j)), sortedList[j], true).
// b. Set j to j + 1.
for (int j = 0; j < itemCount; j++) {
for (uint32_t j = 0; j < itemCount; j++) {
valueHandle.Update(sortedList->Get(j));
ElementAccessor::Set(thread, thisObj, j, valueHandle, needTransition);
}
@ -1742,7 +1742,7 @@ JSTaggedValue JSStableArray::CopySortedListToReceiver(JSThread *thread, const JS
// a. Perform ? DeletePropertyOrThrow(obj, ! ToString((j))).
// b. Set j to j + 1.
valueHandle.Update(JSTaggedValue::Hole());
for (int j = itemCount; j < len; j++) {
for (uint32_t j = itemCount; j < len; j++) {
ElementAccessor::Set(thread, thisObj, j, valueHandle, needTransition);
}
JSHandle<JSArray>::Cast(thisObj)->SetArrayLength(thread, newLength);