It is possible to cause a crash in WebKit if you enter full screen mode, exit full screen mode, and close the main view quickly enough. The crash is due to an animation thread attempting to interact with a deallocated window. When we decide to rapidly terminate a window, we need to tell any existing animation controllers to stop animating, and clear their window references.
Created attachment 229107 [details] Patch
<rdar://problem/13967272>
Comment on attachment 229107 [details] Patch Nice! r=me.
Created attachment 229138 [details] I think this resolves the 'real' problem
It was bothering me that we were entering the WKFullScreenWindowController::close method with _fullScreenState != ExitingFullScreen, but _scaleAnimation still non-nil and running an animation. I think the actual fix need to be done 'finishedExitFullScreenAnimation', where we clean up the _fadeAnimation, but don't touch the _scaleAnimation. I still like the initial fix to protect us against leaving a running animation when the window is going away, but I think the 'real' fix is this second patch.
Comment on attachment 229138 [details] I think this resolves the 'real' problem Updated patch that makes sure we never are in a state where '_fullScreenState != ExitingFullScreen' while we have a running animation.
Comment on attachment 229138 [details] I think this resolves the 'real' problem re-r=me.
Committed r167130: <http://trac.webkit.org/changeset/167130>