From b833c3f02aeaa84d1d3b448957986011549b8cf4 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Mon, 22 Jul 2024 10:20:27 -0500 Subject: [PATCH] chore: remove unused BaseWindow::GetWeakPtr() (#42988) last caller removed in 67ba3040 (#37902) Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Charles Kerr --- shell/browser/api/electron_api_base_window.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/shell/browser/api/electron_api_base_window.h b/shell/browser/api/electron_api_base_window.h index cf2844015ad9..eeb632beac6f 100644 --- a/shell/browser/api/electron_api_base_window.h +++ b/shell/browser/api/electron_api_base_window.h @@ -33,8 +33,6 @@ class BaseWindow : public gin_helper::TrackableObject, static void BuildPrototype(v8::Isolate* isolate, v8::Local prototype); - base::WeakPtr GetWeakPtr() { return weak_factory_.GetWeakPtr(); } - NativeWindow* window() const { return window_.get(); } protected: @@ -277,6 +275,7 @@ class BaseWindow : public gin_helper::TrackableObject, // Reference to JS wrapper to prevent garbage collection. v8::Global self_ref_; + private: base::WeakPtrFactory weak_factory_{this}; };