fix: dangling raw_ptr<Session> in UserDataLink (#42822)
* fix: dangling raw_ptr<Session> in UserDataLink * fixup! fix: dangling raw_ptr<Session> in UserDataLink
This commit is contained in:
parent
445c857318
commit
06308d8f23
2 changed files with 11 additions and 6 deletions
|
@ -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"
|
||||
|
@ -215,7 +216,9 @@ class Session : public gin::Wrappable<Session>,
|
|||
// The client id to enable the network throttler.
|
||||
base::UnguessableToken network_emulation_token_;
|
||||
|
||||
raw_ptr<ElectronBrowserContext> browser_context_;
|
||||
const raw_ptr<ElectronBrowserContext> browser_context_;
|
||||
|
||||
base::WeakPtrFactory<Session> weak_factory_{this};
|
||||
};
|
||||
|
||||
} // namespace api
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue