refactor: simplify WebContents::Destroy (#35510)
This commit is contained in:
parent
1830c0f6c3
commit
5fe1ac5c3d
1 changed files with 2 additions and 6 deletions
|
@ -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()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue