refactor: remove unused internal method WebContents.equal() (#50626)

refactor: remove unused internal method WebContents.equal()

last use removed in Feb 2021 @ 51bb0ad36d
This commit is contained in:
Charles Kerr
2026-04-02 12:46:39 -05:00
committed by GitHub
parent 877fe479b5
commit 1362d7b94d
3 changed files with 0 additions and 7 deletions

View File

@@ -2458,10 +2458,6 @@ base::ProcessId WebContents::GetOSProcessID() const {
return base::GetProcId(process_handle);
}
bool WebContents::Equal(const WebContents* web_contents) const {
return ID() == web_contents->ID();
}
GURL WebContents::GetURL() const {
return web_contents()->GetLastCommittedURL();
}
@@ -4588,7 +4584,6 @@ void WebContents::FillObjectTemplate(v8::Isolate* isolate,
&WebContents::SetBackgroundThrottling)
.SetMethod("getProcessId", &WebContents::GetProcessID)
.SetMethod("getOSProcessId", &WebContents::GetOSProcessID)
.SetMethod("equal", &WebContents::Equal)
.SetMethod("_loadURL", &WebContents::LoadURL)
.SetMethod("reload", &WebContents::Reload)
.SetMethod("reloadIgnoringCache", &WebContents::ReloadIgnoringCache)

View File

@@ -195,7 +195,6 @@ class WebContents final : public ExclusiveAccessContext,
int32_t GetProcessID() const;
base::ProcessId GetOSProcessID() const;
[[nodiscard]] Type type() const { return type_; }
bool Equal(const WebContents* web_contents) const;
void LoadURL(const GURL& url, const gin_helper::Dictionary& options);
void Reload();
void ReloadIgnoringCache();

View File

@@ -93,7 +93,6 @@ declare namespace Electron {
getLastWebPreferences(): Electron.WebPreferences | null;
_getProcessMemoryInfo(): Electron.ProcessMemoryInfo;
_getPreloadScript(): Electron.PreloadScript | null;
equal(other: WebContents): boolean;
browserWindowOptions: BrowserWindowConstructorOptions;
_windowOpenHandler: ((details: Electron.HandlerDetails) => any) | null;
_callWindowOpenHandler(event: any, details: Electron.HandlerDetails): {browserWindowConstructorOptions: Electron.BrowserWindowConstructorOptions | null, outlivesOpener: boolean, createWindow?: Electron.CreateWindowFunction};