mirror of
https://gitee.com/openharmony/arkcompiler_ets_runtime
synced 2024-11-23 10:09:54 +00:00
Fix assert bug
Issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/IB0UQB Signed-off-by: 王笑佳 <wangxiaojia5@huawei.com>
This commit is contained in:
parent
d5527468e1
commit
623d8b7ce4
@ -200,7 +200,9 @@ JSHandle<TaggedArray> JSAPIDeque::OwnKeys(JSThread *thread, const JSHandle<JSAPI
|
||||
uint32_t length = deque->GetSize();
|
||||
|
||||
JSHandle<TaggedArray> oldElements(thread, deque->GetElements());
|
||||
ASSERT(!oldElements->IsDictionaryMode());
|
||||
if (oldElements->IsDictionaryMode()) {
|
||||
return JSObject::GetOwnPropertyKeys(thread, JSHandle<JSObject>::Cast(deque));
|
||||
}
|
||||
uint32_t oldCapacity = oldElements->GetLength();
|
||||
uint32_t newCapacity = ComputeCapacity(oldCapacity);
|
||||
uint32_t firstIndex = deque->GetFirst();
|
||||
|
@ -158,7 +158,9 @@ JSHandle<TaggedArray> JSAPIQueue::OwnKeys(JSThread *thread, const JSHandle<JSAPI
|
||||
uint32_t length = obj->GetLength().GetArrayLength();
|
||||
|
||||
JSHandle<TaggedArray> oldElements(thread, obj->GetElements());
|
||||
ASSERT(!oldElements->IsDictionaryMode());
|
||||
if (oldElements->IsDictionaryMode()) {
|
||||
return JSObject::GetOwnPropertyKeys(thread, JSHandle<JSObject>::Cast(obj));
|
||||
}
|
||||
uint32_t oldCapacity = oldElements->GetLength();
|
||||
uint32_t newCapacity = ComputeCapacity(oldCapacity);
|
||||
uint32_t front = obj->GetFront();
|
||||
|
@ -168,5 +168,15 @@ if (globalThis["ArkPrivate"] != undefined) {
|
||||
v22 = new C11()
|
||||
v22[2295334561] = 0
|
||||
print(v22.length)
|
||||
class C44 extends Deque{
|
||||
constructor(a) {
|
||||
super()
|
||||
super[a] = 11
|
||||
const o10 = {
|
||||
...this
|
||||
}
|
||||
}
|
||||
}
|
||||
new C44(38062)
|
||||
}
|
||||
export let dequeRes = "Test Deque done";
|
||||
|
@ -162,5 +162,15 @@ if (globalThis["ArkPrivate"] != undefined) {
|
||||
} catch (error) {
|
||||
print(error)
|
||||
}
|
||||
class C4 extends Queue{
|
||||
constructor(a) {
|
||||
super()
|
||||
super[a] = 11
|
||||
const o10 = {
|
||||
...this
|
||||
}
|
||||
}
|
||||
}
|
||||
new C4(38062)
|
||||
}
|
||||
export let queueRes = "Test Queue done";
|
||||
|
Loading…
Reference in New Issue
Block a user