fix: browser contexts live forever (#24964)
This commit is contained in:
parent
befbbc27d8
commit
bac2f46ba9
11 changed files with 68 additions and 73 deletions
|
@ -250,14 +250,8 @@ void CommonWebContentsDelegate::ResetManagedWebContents(bool async) {
|
|||
// is destroyed.
|
||||
// //electron/patches/chromium/content_browser_main_loop.patch
|
||||
// is required to get the right quit closure for the main message loop.
|
||||
base::ThreadTaskRunnerHandle::Get()->PostNonNestableTask(
|
||||
FROM_HERE,
|
||||
base::BindOnce(
|
||||
[](scoped_refptr<ElectronBrowserContext> browser_context,
|
||||
std::unique_ptr<InspectableWebContents> web_contents) {
|
||||
web_contents.reset();
|
||||
},
|
||||
base::RetainedRef(browser_context_), std::move(web_contents_)));
|
||||
base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE,
|
||||
web_contents_.release());
|
||||
} else {
|
||||
web_contents_.reset();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue