diff --git a/ecmascript/napi/dfx_jsnapi.cpp b/ecmascript/napi/dfx_jsnapi.cpp index 7876c975b2..8aff4d5c44 100644 --- a/ecmascript/napi/dfx_jsnapi.cpp +++ b/ecmascript/napi/dfx_jsnapi.cpp @@ -246,7 +246,7 @@ void DFXJSNApi::TriggerGC([[maybe_unused]] const EcmaVM *vm, [[maybe_unused]] ui return; } }); - // triggerSharedGC + // triggerSharedFullGC TriggerSharedGCWithVm(vm); } @@ -274,7 +274,8 @@ void DFXJSNApi::TriggerSharedGCWithVm([[maybe_unused]] const EcmaVM *vm) ecmascript::SharedHeap* sHeap = ecmascript::SharedHeap::GetInstance(); JSThread *thread = vm->GetJSThread(); ecmascript::ThreadManagedScope managedScope(thread); - sHeap->CollectGarbage(thread); + sHeap->CollectGarbage(thread); delete work; }); if (ret != 0) {