!5391 [BugFix] Assertion failed in GetTaggedObject

Merge pull request !5391 from 刘家华/master
This commit is contained in:
openharmony_ci 2023-11-30 08:17:06 +00:00 committed by Gitee
commit 3f39ca6da0
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
4 changed files with 11 additions and 5 deletions

View File

@ -444,7 +444,7 @@ void JSNumberFormat::InitializeNumberFormat(JSThread *thread, const JSHandle<JSN
ObjectFactory *factory = ecmaVm->GetFactory();
// 1. Let requestedLocales be ? CanonicalizeLocaleList(locales).
JSHandle<TaggedArray> requestedLocales = intl::LocaleHelper::CanonicalizeLocaleList(thread, locales);
RETURN_IF_ABRUPT_COMPLETION(thread);
// 2. If options is undefined, then
// a. Let options be ObjectCreate(null).
// 3. Else,

View File

@ -92,9 +92,7 @@ JSHandle<JSNativePointer> ObjectFactory::NewJSNativePointer(void *externalPointe
obj->SetNativeFlag(flag);
if (callBack != nullptr) {
if (flag == NativeFlag::NO_DIV) {
heap_->IncreaseNativeBindingSize(nativeBindingsize);
}
heap_->IncreaseNativeBindingSize(nativeBindingsize);
vm_->PushToNativePointerList(static_cast<JSNativePointer *>(header));
// In some cases, the size of JS/TS object is too small and the native binding size is too large.
// Check and try trigger concurrent mark here.

View File

@ -92,4 +92,11 @@ hmap.set(c, '3');
hmap.set(d, '4');
hmap.forEach((val,key)=>{
print("hmap val:" + val, "key :" + key);
})
})
const v83 = new BigUint64Array(1096);
try {
v83["toLocaleString"]("toLocaleString", "toLocaleString");
} catch (error) {
print(error);
}

View File

@ -23,3 +23,4 @@ SyntaxError
0
map val:4 key :9007199254740991
hmap val:4 key :9007199254740991
RangeError: invalid locale