chore: remove deprecated app.runningUnderRosettaTranslation()
(#39956)
This commit is contained in:
parent
5643e86956
commit
d301616f60
6 changed files with 15 additions and 27 deletions
|
@ -1767,8 +1767,6 @@ gin::ObjectTemplateBuilder App::GetObjectTemplateBuilder(v8::Isolate* isolate) {
|
|||
#endif
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
.SetProperty("dock", &App::GetDockAPI)
|
||||
.SetProperty("runningUnderRosettaTranslation",
|
||||
&App::IsRunningUnderRosettaTranslation)
|
||||
#endif
|
||||
#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
|
||||
.SetProperty("runningUnderARM64Translation",
|
||||
|
|
|
@ -229,7 +229,6 @@ class App : public ElectronBrowserClient::Delegate,
|
|||
bool MoveToApplicationsFolder(gin_helper::ErrorThrower, gin::Arguments* args);
|
||||
bool IsInApplicationsFolder();
|
||||
v8::Local<v8::Value> GetDockAPI(v8::Isolate* isolate);
|
||||
bool IsRunningUnderRosettaTranslation() const;
|
||||
v8::Global<v8::Value> dock_;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -60,17 +60,6 @@ void App::SetActivationPolicy(gin_helper::ErrorThrower thrower,
|
|||
[NSApp setActivationPolicy:activation_policy];
|
||||
}
|
||||
|
||||
bool App::IsRunningUnderRosettaTranslation() const {
|
||||
node::Environment* env =
|
||||
node::Environment::GetCurrent(JavascriptEnvironment::GetIsolate());
|
||||
|
||||
EmitWarning(env,
|
||||
"The app.runningUnderRosettaTranslation API is deprecated, use "
|
||||
"app.runningUnderARM64Translation instead.",
|
||||
"electron");
|
||||
return IsRunningUnderARM64Translation();
|
||||
}
|
||||
|
||||
bool App::IsRunningUnderARM64Translation() const {
|
||||
int proc_translated = 0;
|
||||
size_t size = sizeof(proc_translated);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue