Title: [227218] trunk/Source/WebKit
- Revision
- 227218
- Author
- [email protected]
- Date
- 2018-01-19 11:02:05 -0800 (Fri, 19 Jan 2018)
Log Message
REGRESSION (r223149): Ref WebPageProxy objects before calling their functionality
https://bugs.webkit.org/show_bug.cgi?id=181863
<rdar://problem/36662452>
Reviewed by Chris Dumez.
More fix ups following r223149. When notifying all pages of a process state change we need to
take care to ref all the pages before iterating over them and notifying them of the change.
Notifying a page of such a state change may ultimately delegate to the embedding client. And
the embedding client can do anything, including deallocating one or more pages.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::didBecomeUnresponsive):
(WebKit::WebProcessProxy::didBecomeResponsive):
(WebKit::WebProcessProxy::willChangeIsResponsive):
(WebKit::WebProcessProxy::didChangeIsResponsive):
(WebKit::WebProcessProxy::requestTermination):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (227217 => 227218)
--- trunk/Source/WebKit/ChangeLog 2018-01-19 18:51:52 UTC (rev 227217)
+++ trunk/Source/WebKit/ChangeLog 2018-01-19 19:02:05 UTC (rev 227218)
@@ -1,3 +1,23 @@
+2018-01-19 Daniel Bates <[email protected]>
+
+ REGRESSION (r223149): Ref WebPageProxy objects before calling their functionality
+ https://bugs.webkit.org/show_bug.cgi?id=181863
+ <rdar://problem/36662452>
+
+ Reviewed by Chris Dumez.
+
+ More fix ups following r223149. When notifying all pages of a process state change we need to
+ take care to ref all the pages before iterating over them and notifying them of the change.
+ Notifying a page of such a state change may ultimately delegate to the embedding client. And
+ the embedding client can do anything, including deallocating one or more pages.
+
+ * UIProcess/WebProcessProxy.cpp:
+ (WebKit::WebProcessProxy::didBecomeUnresponsive):
+ (WebKit::WebProcessProxy::didBecomeResponsive):
+ (WebKit::WebProcessProxy::willChangeIsResponsive):
+ (WebKit::WebProcessProxy::didChangeIsResponsive):
+ (WebKit::WebProcessProxy::requestTermination):
+
2018-01-19 Chris Dumez <[email protected]>
The WebContent process should not process incoming IPC while waiting for a sync IPC reply
Modified: trunk/Source/WebKit/UIProcess/WebProcessProxy.cpp (227217 => 227218)
--- trunk/Source/WebKit/UIProcess/WebProcessProxy.cpp 2018-01-19 18:51:52 UTC (rev 227217)
+++ trunk/Source/WebKit/UIProcess/WebProcessProxy.cpp 2018-01-19 19:02:05 UTC (rev 227218)
@@ -666,7 +666,7 @@
auto isResponsiveCallbacks = WTFMove(m_isResponsiveCallbacks);
- for (auto& page : copyToVector(m_pageMap.values()))
+ for (auto& page : copyToVectorOf<RefPtr<WebPageProxy>>(m_pageMap.values()))
page->processDidBecomeUnresponsive();
bool isWebProcessResponsive = false;
@@ -678,19 +678,19 @@
{
m_isResponsive = NoOrMaybe::Maybe;
- for (auto& page : copyToVector(m_pageMap.values()))
+ for (auto& page : copyToVectorOf<RefPtr<WebPageProxy>>(m_pageMap.values()))
page->processDidBecomeResponsive();
}
void WebProcessProxy::willChangeIsResponsive()
{
- for (auto& page : copyToVector(m_pageMap.values()))
+ for (auto& page : copyToVectorOf<RefPtr<WebPageProxy>>(m_pageMap.values()))
page->willChangeProcessIsResponsive();
}
void WebProcessProxy::didChangeIsResponsive()
{
- for (auto& page : copyToVector(m_pageMap.values()))
+ for (auto& page : copyToVectorOf<RefPtr<WebPageProxy>>(m_pageMap.values()))
page->didChangeProcessIsResponsive();
}
@@ -897,7 +897,7 @@
if (webConnection())
webConnection()->didClose();
- auto pages = copyToVector(m_pageMap.values());
+ auto pages = copyToVectorOf<RefPtr<WebPageProxy>>(m_pageMap.values());
shutDown();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes