refactor: ginify Session (#23569)
This commit is contained in:
parent
3f3a760a01
commit
de44d28c8e
11 changed files with 135 additions and 111 deletions
|
@ -1448,9 +1448,15 @@ v8::Local<v8::Value> App::GetDockAPI(v8::Isolate* isolate) {
|
|||
}
|
||||
#endif
|
||||
|
||||
// static
|
||||
App* App::Get() {
|
||||
static base::NoDestructor<App> app(v8::Isolate::GetCurrent());
|
||||
return app.get();
|
||||
}
|
||||
|
||||
// static
|
||||
gin::Handle<App> App::Create(v8::Isolate* isolate) {
|
||||
return gin::CreateHandle(isolate, new App(isolate));
|
||||
return gin::CreateHandle(isolate, Get());
|
||||
}
|
||||
|
||||
// static
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue