fix: destruction order of js env fields (#39521)

isolate_ depends on isolate_holder_ and so must be destroyed first.
This commit is contained in:
Charles Kerr 2023-08-16 23:06:24 -05:00 committed by GitHub
parent b04ce6a5c8
commit dd8df3b0c4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 4 deletions

View file

@ -43,8 +43,12 @@ class JavascriptEnvironment {
v8::Isolate* Initialize(uv_loop_t* event_loop, bool setup_wasm_streaming);
std::unique_ptr<node::MultiIsolatePlatform> platform_;
raw_ptr<v8::Isolate> isolate_;
gin::IsolateHolder isolate_holder_;
// owned-by: isolate_holder_
const raw_ptr<v8::Isolate> isolate_;
// depends-on: isolate_
v8::Locker locker_;
std::unique_ptr<MicrotasksRunner> microtasks_runner_;