Destroy JS env immediately after running destruction callbacks
This commit is contained in:
parent
84410a7e1c
commit
07c55f321f
1 changed files with 8 additions and 0 deletions
|
@ -137,6 +137,14 @@ void AtomBrowserMainParts::PostMainMessageLoopRun() {
|
|||
// won't be freed.
|
||||
for (const auto& callback : destruction_callbacks_)
|
||||
callback.Run();
|
||||
|
||||
// Destroy JavaScript environment immediately after running destruction
|
||||
// callbacks.
|
||||
gc_timer_.Stop();
|
||||
node_debugger_.reset();
|
||||
atom_bindings_.reset();
|
||||
node_bindings_.reset();
|
||||
js_env_.reset();
|
||||
}
|
||||
|
||||
} // namespace atom
|
||||
|
|
Loading…
Reference in a new issue