Crash loading skydrive.com (assertion under RemoteLayerTreeDisplayRefreshMonitor)
https://bugs.webkit.org/show_bug.cgi?id=133370
<rdar://problem/
17061361>
Reviewed by Darin Adler.
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
(WebKit::RemoteLayerTreeDrawingArea::willDestroyDisplayRefreshMonitor):
(WebKit::RemoteLayerTreeDrawingArea::didUpdate):
Post-landing review comments from Darin noted that checking if the
DrawingArea's m_displayRefreshMonitors contains the monitor in the
list to notify is insufficient, because a new one could have been
added with the same address. Instead, copy the HashSet, removing
at random from it and firing didUpdateLayers, but *also* removing
from it in the willDestroyDisplayRefreshMonitor callback.
This is very similar to what DisplayRefreshMonitor itself does internally
(we don't have to duplicate its code to avoid re-entry because it is
already impossible to re-enter didUpdate).
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@169486
268f45cc-cd09-0410-ab3c-
d52691b4dbfc