diff --git a/src/heap_utils.cc b/src/heap_utils.cc index b996f78aa4199b..b6c8c75c159846 100644 --- a/src/heap_utils.cc +++ b/src/heap_utils.cc @@ -385,15 +385,9 @@ void Initialize(Local target, void* priv) { Environment* env = Environment::GetCurrent(context); - env->SetMethodNoSideEffect(target, - "buildEmbedderGraph", - BuildEmbedderGraph); - env->SetMethodNoSideEffect(target, - "triggerHeapSnapshot", - TriggerHeapSnapshot); - env->SetMethodNoSideEffect(target, - "createHeapSnapshotStream", - CreateHeapSnapshotStream); + env->SetMethod(target, "buildEmbedderGraph", BuildEmbedderGraph); + env->SetMethod(target, "triggerHeapSnapshot", TriggerHeapSnapshot); + env->SetMethod(target, "createHeapSnapshotStream", CreateHeapSnapshotStream); // Create FunctionTemplate for HeapSnapshotStream Local os = FunctionTemplate::New(env->isolate());