mirror of
https://gitee.com/openharmony/arkcompiler_ets_runtime
synced 2024-10-07 16:13:49 +00:00
Fix isOneByte assert
Issues: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I8TJ04 Signed-off-by: K0u1hw <wangchunyang15@huawei.com> Change-Id: Iaf9390a3c576cadff5a64b635b0b51561bf4804f
This commit is contained in:
parent
d03813d421
commit
752896650d
@ -267,6 +267,10 @@ JSTaggedValue JSStableArray::Join(JSHandle<JSArray> receiver, EcmaRuntimeCallInf
|
||||
if (elementsLength == 0 && length != 0) {
|
||||
len = length;
|
||||
}
|
||||
if (len <= 1) {
|
||||
// sep unused, set isOneByte to default(true)
|
||||
isOneByte = true;
|
||||
}
|
||||
for (uint32_t k = 0; k < len; k++) {
|
||||
JSTaggedValue element = JSTaggedValue::Undefined();
|
||||
if (k < elementsLength) {
|
||||
|
@ -75,4 +75,6 @@ try {
|
||||
Object.getOwnPropertyDescriptors(Array(1e9).join('c'))
|
||||
} catch (e) {
|
||||
print(e instanceof RangeError);
|
||||
}
|
||||
}
|
||||
|
||||
([11])["join"]('쏄');
|
Loading…
Reference in New Issue
Block a user