mirror of
https://github.com/electron/electron.git
synced 2026-01-09 15:38:08 -05:00
refactor: simplify WebContents::Destroy (#35510)
This commit is contained in:
@@ -1000,12 +1000,8 @@ void WebContents::Destroy() {
|
||||
DeleteThisIfAlive();
|
||||
} else {
|
||||
content::GetUIThreadTaskRunner({})->PostTask(
|
||||
FROM_HERE, base::BindOnce(
|
||||
[](base::WeakPtr<WebContents> contents) {
|
||||
if (contents)
|
||||
contents->DeleteThisIfAlive();
|
||||
},
|
||||
GetWeakPtr()));
|
||||
FROM_HERE,
|
||||
base::BindOnce(&WebContents::DeleteThisIfAlive, GetWeakPtr()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user