fix container using error and gc bug

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
This commit is contained in:
wengchangcheng
2021-10-20 17:35:03 +08:00
parent 3e552f1be0
commit 9a7fcb6e3c
21 changed files with 111 additions and 112 deletions
+2 -2
View File
@@ -190,8 +190,8 @@ void JSArray::SetCapacity(JSThread *thread, const JSHandle<JSObject> &array, uin
uint32_t attr = dictHandle->GetAttributes(entry).GetValue();
PropertyAttributes propAttr(attr);
if (propAttr.IsConfigurable()) {
NumberDictionary *dictionary = NumberDictionary::Remove(thread, dictHandle, entry);
array->SetElements(thread, JSTaggedValue(dictionary));
NumberDictionary *newDict = NumberDictionary::Remove(thread, dictHandle, entry);
array->SetElements(thread, JSTaggedValue(newDict));
if (i == 0) {
newNumOfElements = i;
break;