Make each class only have one weak map
This commit is contained in:
		
					parent
					
						
							
								28d1fb8cad
							
						
					
				
			
			
				commit
				
					
						cc8b22b5ff
					
				
			
		
					 10 changed files with 130 additions and 65 deletions
				
			
		| 
						 | 
				
			
			@ -42,10 +42,6 @@ BrowserWindow::setMenu = (menu) ->
 | 
			
		|||
  @menu = menu  # Keep a reference of menu in case of GC.
 | 
			
		||||
  @_setMenu menu
 | 
			
		||||
 | 
			
		||||
BrowserWindow.getAllWindows = ->
 | 
			
		||||
  windows = BrowserWindow.windows
 | 
			
		||||
  windows.get key for key in windows.keys()
 | 
			
		||||
 | 
			
		||||
BrowserWindow.getFocusedWindow = ->
 | 
			
		||||
  windows = BrowserWindow.getAllWindows()
 | 
			
		||||
  return window for window in windows when window.isFocused()
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue