refactor: add ElectronBrowserContext::GetDefaultBrowserContext()
(#46065)
* refactor: add ElectronBrowserContext::DestroyAllContexts() Simpler semantics than previous implementation; also hides the "default context must be destroyed last" implementation detail. * refactor: add ElectronBrowserContext::GetDefaultBrowserContext() clearer semantics than everyone calling From("", false)
This commit is contained in:
parent
9513486bf3
commit
4bf99c9bea
8 changed files with 26 additions and 11 deletions
|
@ -1679,7 +1679,7 @@ gin::Handle<Session> Session::FromPartition(v8::Isolate* isolate,
|
|||
ElectronBrowserContext* browser_context;
|
||||
if (partition.empty()) {
|
||||
browser_context =
|
||||
ElectronBrowserContext::From("", false, std::move(options));
|
||||
ElectronBrowserContext::GetDefaultBrowserContext(std::move(options));
|
||||
} else if (partition.starts_with(kPersistPrefix)) {
|
||||
std::string name = partition.substr(8);
|
||||
browser_context =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue