Avoid destorying api::WebContents for twice

This commit is contained in:
Cheng Zhao 2015-06-05 18:13:30 +08:00
parent af62b7b5c9
commit bb42c2c7b6

View file

@ -409,7 +409,7 @@ void WebContents::WillAttach(content::WebContents* embedder_web_contents,
}
void WebContents::Destroy() {
if (is_guest()) {
if (is_guest() && managed_web_contents()) {
// When force destroying the "destroyed" event is not emitted.
WebContentsDestroyed();