fix: dangling raw_ptr<Session> in UserDataLink (#42786)

* fix: dangling raw_ptr<Session> in UserDataLink

* chore: make linter happy
This commit is contained in:
Charles Kerr 2024-07-08 05:55:48 -05:00 committed by GitHub
parent cb2e7f130b
commit e89da2bad2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 5 deletions

View file

@ -10,6 +10,7 @@
#include <vector>
#include "base/memory/raw_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/values.h"
#include "content/public/browser/download_manager.h"
#include "electron/buildflags/buildflags.h"
@ -218,6 +219,8 @@ class Session : public gin::Wrappable<Session>,
base::UnguessableToken network_emulation_token_;
const raw_ref<ElectronBrowserContext> browser_context_;
base::WeakPtrFactory<Session> weak_factory_{this};
};
} // namespace api