Skip to content

Commit cc82d26

Browse files
gahaaspthier
authored andcommitted
Always create a CppHeap at isolate creation (#211)
With the new V8 API, the CppHeap should be provided during Isolate initialization.
1 parent 93b7917 commit cc82d26

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/api/environment.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,10 @@ Isolate* NewIsolate(Isolate::CreateParams* params,
311311
MultiIsolatePlatform* platform,
312312
const SnapshotData* snapshot_data,
313313
const IsolateSettings& settings) {
314+
if (params->cpp_heap == nullptr) {
315+
params->cpp_heap =
316+
v8::CppHeap::Create(platform, v8::CppHeapCreateParams{{}}).release();
317+
}
314318
Isolate* isolate = Isolate::Allocate();
315319
if (isolate == nullptr) return nullptr;
316320

0 commit comments

Comments
 (0)