Fix crash when closing page with webview

This commit is contained in:
Cheng Zhao 2016-01-13 14:47:39 +08:00
parent af02739c4e
commit 44b8343585
2 changed files with 13 additions and 9 deletions

View file

@ -52,7 +52,7 @@ createGuest = function(embedder, params) {
};
/* Destroy guest when the embedder is gone or navigated. */
destroyEvents = ['destroyed', 'crashed', 'did-navigate'];
destroyEvents = ['will-destroy', 'crashed', 'did-navigate'];
destroy = function() {
if (guestInstances[id] != null) {
return destroyGuest(embedder, id);