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
|
@ -598,11 +598,7 @@ void ElectronBrowserMainParts::PostMainMessageLoopRun() {
|
|||
node_bindings_->set_uv_env(nullptr);
|
||||
node_env_.reset();
|
||||
|
||||
auto default_context_key = ElectronBrowserContext::PartitionKey("", false);
|
||||
std::unique_ptr<ElectronBrowserContext> default_context = std::move(
|
||||
ElectronBrowserContext::browser_context_map()[default_context_key]);
|
||||
ElectronBrowserContext::browser_context_map().clear();
|
||||
default_context.reset();
|
||||
ElectronBrowserContext::DestroyAllContexts();
|
||||
|
||||
fake_browser_process_->PostMainMessageLoopRun();
|
||||
content::DevToolsAgentHost::StopRemoteDebuggingPipeHandler();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue