!9838 HClass changed but not Notify bugfix

Merge pull request !9838 from jiachong/jc_dts
This commit is contained in:
openharmony_ci 2024-10-18 12:51:29 +00:00 committed by Gitee
commit 31ce5d8d1e
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 14 additions and 1 deletions

View File

@ -688,6 +688,10 @@ bool JSHClass::TransitToElementsKindUncheck(const JSThread *thread, const JSHand
auto hclassVal = thread->GlobalConstants()->GetGlobalConstantObject(index);
JSHClass *hclass = JSHClass::Cast(hclassVal.GetTaggedObject());
obj->SynchronizedSetClass(thread, hclass);
#if ECMASCRIPT_ENABLE_IC
JSHClass::NotifyHclassChanged(thread, JSHandle<JSHClass>(thread, objHclass),
JSHandle<JSHClass>(thread, hclass));
#endif
return true;
}
LOG_ECMA(FATAL) << "Unknown newKind: " << static_cast<int32_t>(newKind);

View File

@ -21,3 +21,4 @@ undefined
1
1
1
4

View File

@ -127,4 +127,12 @@ function fun1(n) {
}
print(fun1(100));
print(fun1(1));
print(fun1(1));
const v0 = [4.0, 3.0, -1.7976931348623157e+308, 1000000000.0];
const v3 = { __proto__: v0 };
const v4 = { __proto__: v3 };
v4[3] = v4;
v0[1] = v0;
v3.splice(0, 0);
print(v3.length);