From 2ad5d1ff715b33a098613b42ba01e30f41d8ee49 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Thu, 1 Aug 2024 21:32:17 -0500 Subject: [PATCH] chore: remove unused internal env.unSetVar() (#43175) chore: remove unused unSetVar JS binding Added in Oct 2020 (b33f2260, #25623) but never used Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Charles Kerr --- shell/common/api/electron_api_environment.cc | 5 ----- typings/internal-ambient.d.ts | 1 - 2 files changed, 6 deletions(-) diff --git a/shell/common/api/electron_api_environment.cc b/shell/common/api/electron_api_environment.cc index 0533eda235f2..f785c08594a5 100644 --- a/shell/common/api/electron_api_environment.cc +++ b/shell/common/api/electron_api_environment.cc @@ -25,10 +25,6 @@ bool SetVar(const std::string& name, const std::string& value) { return base::Environment::Create()->SetVar(name, value); } -bool UnSetVar(const std::string& name) { - return base::Environment::Create()->UnSetVar(name); -} - void Initialize(v8::Local exports, v8::Local unused, v8::Local context, @@ -37,7 +33,6 @@ void Initialize(v8::Local exports, dict.SetMethod("getVar", &GetVar); dict.SetMethod("hasVar", &HasVar); dict.SetMethod("setVar", &SetVar); - dict.SetMethod("unSetVar", &UnSetVar); } } // namespace diff --git a/typings/internal-ambient.d.ts b/typings/internal-ambient.d.ts index 83adcbb28f6c..2ac2f55868ac 100644 --- a/typings/internal-ambient.d.ts +++ b/typings/internal-ambient.d.ts @@ -52,7 +52,6 @@ declare namespace NodeJS { getVar(name: string): string | null; hasVar(name: string): boolean; setVar(name: string, value: string): boolean; - unSetVar(name: string): boolean; } type AsarFileInfo = {