refactor: ginify Tray (#22822)

* refactor: ginify Tray

* lint

* improve argument parsing logic

* remove redundant imports from tray.js

* new Tray produces an instanceof Tray

* make Constructible generic

* lint

* clean up on exit
This commit is contained in:
Jeremy Apthorp 2020-03-29 18:32:02 -07:00 committed by GitHub
parent 76ae3b7ecb
commit a3e28788ce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 380 additions and 88 deletions

View file

@ -16,6 +16,7 @@
#include "gin/array_buffer.h"
#include "gin/v8_initializer.h"
#include "shell/browser/microtasks_runner.h"
#include "shell/common/gin_helper/cleaned_up_at_exit.h"
#include "shell/common/node_includes.h"
#include "tracing/trace_event.h"
@ -39,7 +40,9 @@ JavascriptEnvironment::JavascriptEnvironment(uv_loop_t* event_loop)
JavascriptEnvironment::~JavascriptEnvironment() {
{
v8::Locker locker(isolate_);
v8::HandleScope scope(isolate_);
gin_helper::CleanedUpAtExit::DoCleanup();
context_.Get(isolate_)->Exit();
}
isolate_->Exit();