chore: remove unused isolate argument from Cookies constructor (#44923)

* chore: remove unused isolate argument from Cookies constructor

unused since the ginify cookies refactor in Mar 2020, commit 22202255

Co-authored-by: Charles Kerr <charles@charleskerr.com>

* fix: constructor only takes one arg now, so mark it explicit

Co-authored-by: Charles Kerr <charles@charleskerr.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
This commit is contained in:
trop[bot] 2024-12-02 13:25:44 -05:00 committed by GitHub
parent d0668e6a3a
commit 1c2015ed1f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View file

@ -292,8 +292,8 @@ std::string StringToCookieSameSite(const std::string* str_ptr,
gin::WrapperInfo Cookies::kWrapperInfo = {gin::kEmbedderNativeGin};
Cookies::Cookies(v8::Isolate* isolate, ElectronBrowserContext* browser_context)
: browser_context_(browser_context) {
Cookies::Cookies(ElectronBrowserContext* browser_context)
: browser_context_{browser_context} {
cookie_change_subscription_ =
browser_context_->cookie_change_notifier()->RegisterCookieChangeCallback(
base::BindRepeating(&Cookies::OnCookieChanged,
@ -458,7 +458,7 @@ void Cookies::OnCookieChanged(const net::CookieChangeInfo& change) {
// static
gin::Handle<Cookies> Cookies::Create(v8::Isolate* isolate,
ElectronBrowserContext* browser_context) {
return gin::CreateHandle(isolate, new Cookies(isolate, browser_context));
return gin::CreateHandle(isolate, new Cookies{browser_context});
}
gin::ObjectTemplateBuilder Cookies::GetObjectTemplateBuilder(

View file

@ -50,7 +50,7 @@ class Cookies final : public gin::Wrappable<Cookies>,
Cookies& operator=(const Cookies&) = delete;
protected:
Cookies(v8::Isolate* isolate, ElectronBrowserContext* browser_context);
explicit Cookies(ElectronBrowserContext* browser_context);
~Cookies() override;
v8::Local<v8::Promise> Get(v8::Isolate*,