pendingGuestCreation is removed

This commit is contained in:
Cheng Zhao 2015-05-29 11:20:28 +08:00
parent bdf73fcd4c
commit b45ed8d9a2

View file

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