Title: [184785] branches/safari-601.1.32.2-branch/Source/WebKit2
- Revision
- 184785
- Author
- [email protected]
- Date
- 2015-05-22 12:05:33 -0700 (Fri, 22 May 2015)
Log Message
Merged r184692. rdar://problem/20967937
Modified Paths
Diff
Modified: branches/safari-601.1.32.2-branch/Source/WebKit2/ChangeLog (184784 => 184785)
--- branches/safari-601.1.32.2-branch/Source/WebKit2/ChangeLog 2015-05-22 19:03:54 UTC (rev 184784)
+++ branches/safari-601.1.32.2-branch/Source/WebKit2/ChangeLog 2015-05-22 19:05:33 UTC (rev 184785)
@@ -1,5 +1,24 @@
2015-05-22 Babak Shafiei <[email protected]>
+ Merge r184692.
+
+ 2015-05-20 Gavin Barraclough <[email protected]>
+
+ dispatchViewStateChange should not wait for sync reply if the page isn't visible
+ https://bugs.webkit.org/show_bug.cgi?id=145242
+ <rdar://problem/20967937>
+
+ Reviewed by Ben Poulain.
+
+ This is particularly problematic on iOS, since if the page isn't visible the process is likely suspended.
+
+
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::dispatchViewStateChange):
+ (WebKit::WebPageProxy::waitForDidUpdateViewState):
+
+2015-05-22 Babak Shafiei <[email protected]>
+
Merge r184773.
2015-05-22 Dan Bernstein <[email protected]>
Modified: branches/safari-601.1.32.2-branch/Source/WebKit2/UIProcess/WebPageProxy.cpp (184784 => 184785)
--- branches/safari-601.1.32.2-branch/Source/WebKit2/UIProcess/WebPageProxy.cpp 2015-05-22 19:03:54 UTC (rev 184784)
+++ branches/safari-601.1.32.2-branch/Source/WebKit2/UIProcess/WebPageProxy.cpp 2015-05-22 19:05:33 UTC (rev 184785)
@@ -1367,6 +1367,10 @@
if (m_viewWasEverInWindow && (changed & ViewState::IsInWindow) && isInWindow())
m_viewStateChangeWantsSynchronousReply = true;
+ // Don't wait synchronously if the view state is not visible. (This matters in particular on iOS, where a hidden page may be suspended.)
+ if (!(m_viewState & ViewState::IsVisible))
+ m_viewStateChangeWantsSynchronousReply = false;
+
if (changed || m_viewStateChangeWantsSynchronousReply || !m_nextViewStateChangeCallbacks.isEmpty())
m_process->send(Messages::WebPage::SetViewState(m_viewState, m_viewStateChangeWantsSynchronousReply, m_nextViewStateChangeCallbacks), m_pageID);
@@ -1445,6 +1449,15 @@
if (m_waitingForDidUpdateViewState)
return;
+#if PLATFORM(IOS)
+ // Hail Mary check. Should not be possible (dispatchViewStateChange should force async if not visible,
+ // and if visible we should be holding an assertion) - but we should never block on a suspended process.
+ if (!m_activityToken) {
+ ASSERT_NOT_REACHED();
+ return;
+ }
+#endif
+
m_waitingForDidUpdateViewState = true;
m_drawingArea->waitForDidUpdateViewState();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes