refactor: remove uses of v8::Isolate::GetCurrent (#24179)
This commit is contained in:
parent
563a8c83ea
commit
61a05caa78
24 changed files with 69 additions and 46 deletions
|
@ -12,6 +12,7 @@
|
|||
#include "shell/browser/api/electron_api_menu.h"
|
||||
#include "shell/browser/api/ui_event.h"
|
||||
#include "shell/browser/browser.h"
|
||||
#include "shell/browser/javascript_environment.h"
|
||||
#include "shell/common/api/electron_api_native_image.h"
|
||||
#include "shell/common/gin_converters/gfx_converter.h"
|
||||
#include "shell/common/gin_converters/guid_converter.h"
|
||||
|
@ -343,7 +344,7 @@ gfx::Rect Tray::GetBounds() {
|
|||
|
||||
bool Tray::CheckAlive() {
|
||||
if (!tray_icon_) {
|
||||
v8::Isolate* isolate = v8::Isolate::GetCurrent();
|
||||
v8::Isolate* isolate = JavascriptEnvironment::GetIsolate();
|
||||
v8::Locker locker(isolate);
|
||||
v8::HandleScope scope(isolate);
|
||||
gin_helper::ErrorThrower(isolate).ThrowError("Tray is destroyed");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue