]> khamidou — GitHub mirrors - electron.git/commitdiff
pendingGuestCreation is removed
authorCheng Zhao <zcbenz@gmail.com>
Fri, 29 May 2015 03:20:28 +0000 (11:20 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Fri, 29 May 2015 03:20:28 +0000 (11:20 +0800)
atom/renderer/lib/web-view/web-view.coffee

index 94cd897d6a341a98fbc79c879d9a95f8add0e871..6a8e3cf05e58a416ae3b40d63b052e7448534c5c 100644 (file)
@@ -13,7 +13,6 @@ class WebViewImpl
   constructor: (@webviewNode) ->
     v8Util.setHiddenValue @webviewNode, 'internal', this
     @attached = false
-    @pendingGuestCreation = false
     @elementAttached = false
 
     @beforeFirstNavigation = true
@@ -122,16 +121,10 @@ class WebViewImpl
       @dispatchEvent webViewEvent
 
   createGuest: ->
-    return if @pendingGuestCreation
     params =
       storagePartitionId: @attributes[webViewConstants.ATTRIBUTE_PARTITION].getValue()
     guestViewInternal.createGuest 'webview', params, (guestInstanceId) =>
-      @pendingGuestCreation = false
-      unless @elementAttached
-        guestViewInternal.destroyGuest guestInstanceId
-        return
       @attachWindow guestInstanceId
-    @pendingGuestCreation = true
 
   dispatchEvent: (webViewEvent) ->
     @webviewNode.dispatchEvent webViewEvent