refactor: remove more uses of v8::Isolate::GetCurrent() (#28369)
This commit is contained in:
parent
ff96fabe5e
commit
ae2059eaa1
9 changed files with 43 additions and 44 deletions
|
@ -22,6 +22,7 @@
|
|||
#include "content/public/browser/browser_task_traits.h"
|
||||
#include "content/public/browser/browser_thread.h"
|
||||
#include "content/public/browser/desktop_media_id.h"
|
||||
#include "shell/browser/javascript_environment.h"
|
||||
#include "shell/browser/native_browser_view_mac.h"
|
||||
#include "shell/browser/ui/cocoa/electron_native_widget_mac.h"
|
||||
#include "shell/browser/ui/cocoa/electron_ns_window.h"
|
||||
|
@ -278,10 +279,11 @@ NativeWindowMac::NativeWindowMac(const gin_helper::Dictionary& options,
|
|||
options.Get(options::kVisualEffectState, &visual_effect_state_);
|
||||
|
||||
if (options.Has(options::kFullscreenWindowTitle)) {
|
||||
EmitWarning(node::Environment::GetCurrent(v8::Isolate::GetCurrent()),
|
||||
"\"fullscreenWindowTitle\" option has been deprecated and is "
|
||||
"no-op now.",
|
||||
"electron");
|
||||
EmitWarning(
|
||||
node::Environment::GetCurrent(JavascriptEnvironment::GetIsolate()),
|
||||
"\"fullscreenWindowTitle\" option has been deprecated and is "
|
||||
"no-op now.",
|
||||
"electron");
|
||||
}
|
||||
|
||||
bool minimizable = true;
|
||||
|
@ -1313,7 +1315,7 @@ void NativeWindowMac::SetVibrancy(const std::string& type) {
|
|||
|
||||
std::string dep_warn = " has been deprecated and removed as of macOS 10.15.";
|
||||
node::Environment* env =
|
||||
node::Environment::GetCurrent(v8::Isolate::GetCurrent());
|
||||
node::Environment::GetCurrent(JavascriptEnvironment::GetIsolate());
|
||||
|
||||
NSVisualEffectMaterial vibrancyType;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue