mirror of
https://gitee.com/openharmony/arkcompiler_ets_runtime
synced 2024-11-30 21:51:21 +00:00
!6771 Add managedScope for GetLiveObjectSize
Merge pull request !6771 from xiongluo/managed_scope
This commit is contained in:
commit
a0dc05cc70
@ -377,6 +377,7 @@ void DFXJSNApi::StopRuntimeStat(EcmaVM *vm)
|
||||
|
||||
size_t DFXJSNApi::GetArrayBufferSize(const EcmaVM *vm)
|
||||
{
|
||||
ecmascript::ThreadManagedScope managedScope(vm->GetJSThread());
|
||||
return vm->GetHeap()->GetArrayBufferSize();
|
||||
}
|
||||
|
||||
@ -387,6 +388,7 @@ size_t DFXJSNApi::GetHeapTotalSize(const EcmaVM *vm)
|
||||
|
||||
size_t DFXJSNApi::GetHeapUsedSize(const EcmaVM *vm)
|
||||
{
|
||||
ecmascript::ThreadManagedScope managedScope(vm->GetJSThread());
|
||||
return vm->GetHeap()->GetLiveObjectSize();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user