Guard against attachedCallback firing while handling detachedCallback
This commit is contained in:
		
					parent
					
						
							
								18e1de105f
							
						
					
				
			
			
				commit
				
					
						6fda4fc45c
					
				
			
		
					 1 changed files with 5 additions and 2 deletions
				
			
		|  | @ -72,9 +72,12 @@ class WebViewImpl { | |||
|     } | ||||
| 
 | ||||
|     this.webContents = null | ||||
|     this.attributes[webViewConstants.ATTRIBUTE_GUESTINSTANCE].setValueIgnoreMutation(undefined) | ||||
|     this.beforeFirstNavigation = true | ||||
|     this.attributes[webViewConstants.ATTRIBUTE_PARTITION].validPartitionId = true | ||||
| 
 | ||||
|     // Set guestinstance last since this can trigger the attachedCallback to fire
 | ||||
|     // when moving the webview using element.replaceChild
 | ||||
|     this.attributes[webViewConstants.ATTRIBUTE_GUESTINSTANCE].setValueIgnoreMutation(undefined) | ||||
|   } | ||||
| 
 | ||||
|   // Sets the <webview>.request property.
 | ||||
|  | @ -310,8 +313,8 @@ var registerWebViewElement = function () { | |||
|     } | ||||
|     guestViewInternal.deregisterEvents(internal.viewInstanceId) | ||||
|     internal.elementAttached = false | ||||
|     internal.reset() | ||||
|     this.internalInstanceId = 0 | ||||
|     internal.reset() | ||||
|   } | ||||
|   proto.attachedCallback = function () { | ||||
|     var internal, instance | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Kevin Sawicki
				Kevin Sawicki