fix: use-after-free in ElectronBrowserContext during shutdown (#26680)
This commit is contained in:
parent
662077f153
commit
ba629e3127
1 changed files with 4 additions and 0 deletions
|
@ -535,7 +535,11 @@ void ElectronBrowserMainParts::PostMainMessageLoopRun() {
|
|||
node::Stop(node_env_->env());
|
||||
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();
|
||||
|
||||
fake_browser_process_->PostMainMessageLoopRun();
|
||||
content::DevToolsAgentHost::StopRemoteDebuggingPipeHandler();
|
||||
|
|
Loading…
Reference in a new issue