By code inspection: If the WebView is put into a window, then setHostWindow is called to make that same window the host window for the view, then the view is removed from the window, and then the window is closed, the WebView won't get closed. If the WebView is put into a window, then setHostWIndow is called to make that same window the host window for a view, then setHostWindow is called to change the host window back to nil, and then the window is closed, the WebView won't get closed.
Created attachment 20870 [details] patch
Comment on attachment 20870 [details] patch r=me
r32874