fix: call UnregisterIsolate
consistently (#28486)
This commit is contained in:
parent
63317627b5
commit
fe0da255b6
2 changed files with 6 additions and 4 deletions
|
@ -160,6 +160,9 @@ JavascriptEnvironment::JavascriptEnvironment(uv_loop_t* event_loop)
|
|||
}
|
||||
|
||||
JavascriptEnvironment::~JavascriptEnvironment() {
|
||||
DCHECK_NE(platform_, nullptr);
|
||||
platform_->DrainTasks(isolate_);
|
||||
|
||||
{
|
||||
v8::Locker locker(isolate_);
|
||||
v8::HandleScope scope(isolate_);
|
||||
|
@ -167,6 +170,9 @@ JavascriptEnvironment::~JavascriptEnvironment() {
|
|||
}
|
||||
isolate_->Exit();
|
||||
g_isolate = nullptr;
|
||||
|
||||
platform_->CancelPendingDelayedTasks(isolate_);
|
||||
platform_->UnregisterIsolate(isolate_);
|
||||
}
|
||||
|
||||
class EnabledStateObserverImpl final
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue