Don't load URL if web contents is destroyed
This commit is contained in:
parent
095f304d7d
commit
1308f790ad
2 changed files with 11 additions and 0 deletions
|
@ -439,6 +439,11 @@ content::WebContents* WebContents::OpenURLFromTab(
|
|||
if (Emit("will-navigate", params.url))
|
||||
return nullptr;
|
||||
|
||||
// Don't load the URL if the web contents was marked as destroyed from a
|
||||
// will-navigate event listener
|
||||
if (IsDestroyed())
|
||||
return nullptr;
|
||||
|
||||
return CommonWebContentsDelegate::OpenURLFromTab(source, params);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue