diff --git a/ecmascript/object_factory-inl.h b/ecmascript/object_factory-inl.h index a65dd0076ef59dfd73acd54c215c43b4930bf1cf..24a9ab43bf6edfd007e6a2912b3bc87906f853eb 100644 --- a/ecmascript/object_factory-inl.h +++ b/ecmascript/object_factory-inl.h @@ -125,11 +125,11 @@ JSHandle ObjectFactory::NewJSNativePointer(void *externalPointe heap_->IncreaseNativeBindingSize(fixedNativeBindingsize); if (callBack != nullptr) { vm_->PushToNativePointerList(static_cast(header), isConcurrent); - // In some cases, the size of JS/TS object is too small and the native binding size is too large. - // Check and try trigger concurrent mark here. - if (!g_isEnableCMCGC) { - heap_->TryTriggerFullMarkOrGCByNativeSize(); - } + } + // In some cases, the size of JS/TS object is too small and the native binding size is too large. + // Check and try trigger concurrent mark here. + if (!g_isEnableCMCGC) { + heap_->TryTriggerFullMarkOrGCByNativeSize(); } return obj; }