Don't leak listeners in embedder when guest is destroyed

This commit is contained in:
Cheng Zhao 2014-12-17 20:44:15 -08:00
parent a26091e485
commit da54ac5f55
3 changed files with 5 additions and 3 deletions

View file

@ -274,6 +274,9 @@ void WebContents::Destroy() {
if (!destruction_callback_.is_null())
destruction_callback_.Run();
// When force destroying the "destroyed" event is not emitted.
WebContentsDestroyed();
Observe(nullptr);
storage_.reset();
}