Skip to content

Commit 9edb1f5

Browse files
committed
debug check cppheap
1 parent ee3b83b commit 9edb1f5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/node_contextify.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ ContextifyContext* ContextifyContext::New(Local<Context> v8_context,
328328
.ToLocal(&wrapper)) {
329329
return {};
330330
}
331-
331+
DCHECK_NOT_NULL(env->isolate()->GetCppHeap());
332332
result = cppgc::MakeGarbageCollected<ContextifyContext>(
333333
env->isolate()->GetCppHeap()->GetAllocationHandle(),
334334
env,
@@ -975,6 +975,7 @@ void ContextifyScript::RegisterExternalReferences(
975975

976976
ContextifyScript* ContextifyScript::New(Environment* env,
977977
Local<Object> object) {
978+
DCHECK_NOT_NULL(env->isolate()->GetCppHeap());
978979
return cppgc::MakeGarbageCollected<ContextifyScript>(
979980
env->isolate()->GetCppHeap()->GetAllocationHandle(), env, object);
980981
}

0 commit comments

Comments
 (0)