Skip to content

Commit db4fb46

Browse files
committed
[V8] Create isolate only once in V8Platforms c'tor.
1 parent 5baa355 commit db4fb46

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/backend/V8Platform.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -617,6 +617,8 @@ V8Platform::V8Platform()
617617
#define REGISTER(CLASS) phys_opt_.register_operator<m::wasm::CLASS>();
618618
M_WASM_OPERATOR_LIST(REGISTER)
619619
#undef REGISTER
620+
621+
initialize();
620622
}
621623

622624
V8Platform::~V8Platform()
@@ -741,9 +743,7 @@ void V8Platform::execute(const Operator &plan)
741743
dot.show("physical_plan", true);
742744
}
743745

744-
if (not isolate_)
745-
initialize();
746-
746+
M_insist(bool(isolate_), "must have an isolate");
747747
v8::Locker locker(isolate_);
748748
isolate_->Enter();
749749

0 commit comments

Comments
 (0)