fix: manually manage WebContents of webview when it is detached

This commit is contained in:
Cheng Zhao 2018-09-07 15:41:48 +09:00
parent 8e963f10ef
commit 92e094c5f6
5 changed files with 38 additions and 10 deletions

View file

@ -76,6 +76,7 @@ class WebViewImpl {
// heard back from createGuest yet. We will not reset the flag in this case so
// that we don't end up allocating a second guest.
if (this.guestInstanceId) {
guestViewInternal.destroyGuest(this.guestInstanceId)
this.guestInstanceId = void 0
}