View state change callbacks are sometimes dropped on the floor
[WebKit-https.git] / Source / WebKit2 / UIProcess / WebPageProxy.cpp
index 0282e942494d565e4a8574471c86e1021b12ba06..bbb8b94ef76cacb2f3ca8154135b586347a4ed50 100644 (file)
@@ -1228,7 +1228,7 @@ void WebPageProxy::dispatchViewStateChange()
     if (m_viewWasEverInWindow && (changed & ViewState::IsInWindow) && isInWindow())
         m_viewStateChangeWantsSynchronousReply = true;
 
-    if (changed || m_viewStateChangeWantsSynchronousReply)
+    if (changed || m_viewStateChangeWantsSynchronousReply || !m_nextViewStateChangeCallbacks.isEmpty())
         m_process->send(Messages::WebPage::SetViewState(m_viewState, m_viewStateChangeWantsSynchronousReply, m_nextViewStateChangeCallbacks), m_pageID);
 
     m_nextViewStateChangeCallbacks.clear();