chore: stop leaking v8 environment (#22761)

This commit is contained in:
Jeremy Apthorp 2020-03-20 14:15:55 -07:00 committed by GitHub
parent 22c17bcc5b
commit 07a049ef1b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 24 additions and 22 deletions

View file

@ -227,15 +227,6 @@ ElectronBrowserMainParts::ElectronBrowserMainParts(
ElectronBrowserMainParts::~ElectronBrowserMainParts() {
asar::ClearArchives();
// Leak the JavascriptEnvironment on exit.
// This is to work around the bug that V8 would be waiting for background
// tasks to finish on exit, while somehow it waits forever in Electron, more
// about this can be found at
// https://github.com/electron/electron/issues/4767. On the other handle there
// is actually no need to gracefully shutdown V8 on exit in the main process,
// we already ensured all necessary resources get cleaned up, and it would
// make quitting faster.
ignore_result(js_env_.release());
}
// static