mirror of
https://gitee.com/openharmony/arkcompiler_ets_runtime
synced 2024-11-30 13:40:51 +00:00
BugFix of SizeFromJSHClass for Ecmastring
Description: Can not use hclass from header in SizeFromJSHClass because hclass may be forwarded. Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I6R4I3 Signed-off-by: yuanyao <yuanyao14@huawei.com> Change-Id: Ic049d64c29edfeb3be20287ef02c73a8001196fa
This commit is contained in:
parent
f239575570
commit
2ec70f62a7
@ -194,8 +194,11 @@ inline size_t JSHClass::SizeFromJSHClass(TaggedObject *header)
|
||||
size = AlignUp(size, static_cast<size_t>(MemAlignment::MEM_ALIGN_OBJECT));
|
||||
break;
|
||||
case JSType::LINE_STRING:
|
||||
size = LineEcmaString::ObjectSize(reinterpret_cast<EcmaString* >(header));
|
||||
size = AlignUp(size, static_cast<size_t>(MemAlignment::MEM_ALIGN_OBJECT));
|
||||
break;
|
||||
case JSType::TREE_STRING:
|
||||
size = EcmaStringAccessor(reinterpret_cast<EcmaString *>(header)).ObjectSize();
|
||||
size = TreeEcmaString::SIZE;
|
||||
size = AlignUp(size, static_cast<size_t>(MemAlignment::MEM_ALIGN_OBJECT));
|
||||
break;
|
||||
case JSType::MACHINE_CODE_OBJECT:
|
||||
|
Loading…
Reference in New Issue
Block a user