Title: [229001] releases/WebKitGTK/webkit-2.20/Source/WebKit
- Revision
- 229001
- Author
- [email protected]
- Date
- 2018-02-26 03:14:46 -0800 (Mon, 26 Feb 2018)
Log Message
Merge r228854 - ASSERT under WebAutomationSession::setProcessPool() when running W3C test suite a second time
https://bugs.webkit.org/show_bug.cgi?id=182991
<rdar://problem/37620578>
Reviewed by Timothy Hatcher.
Sometimes when running more than one session end-to-end with the same browser instance,
UIProcess would crash under addMessageReceiver because another WebAutomationSession was still
registered. This is hard to reproduce, but upon code inspection, the receiver management code
is somewhat problematic because it only runs when the WebAutomationSession destructor runs.
In some cases the client could retain two sessions and cause the first one to never remove itself
as the message receiver.
Instead of unregistering the session as a message receiver underneath the session's destructor,
do this whenever a new session supplants an old session since there is only one active session at a time.
* UIProcess/Automation/WebAutomationSession.cpp:
(WebKit::WebAutomationSession::~WebAutomationSession):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::setAutomationSession):
Modified Paths
Diff
Modified: releases/WebKitGTK/webkit-2.20/Source/WebKit/ChangeLog (229000 => 229001)
--- releases/WebKitGTK/webkit-2.20/Source/WebKit/ChangeLog 2018-02-26 10:45:49 UTC (rev 229000)
+++ releases/WebKitGTK/webkit-2.20/Source/WebKit/ChangeLog 2018-02-26 11:14:46 UTC (rev 229001)
@@ -1,3 +1,26 @@
+2018-02-20 Brian Burg <[email protected]>
+
+ ASSERT under WebAutomationSession::setProcessPool() when running W3C test suite a second time
+ https://bugs.webkit.org/show_bug.cgi?id=182991
+ <rdar://problem/37620578>
+
+ Reviewed by Timothy Hatcher.
+
+ Sometimes when running more than one session end-to-end with the same browser instance,
+ UIProcess would crash under addMessageReceiver because another WebAutomationSession was still
+ registered. This is hard to reproduce, but upon code inspection, the receiver management code
+ is somewhat problematic because it only runs when the WebAutomationSession destructor runs.
+ In some cases the client could retain two sessions and cause the first one to never remove itself
+ as the message receiver.
+
+ Instead of unregistering the session as a message receiver underneath the session's destructor,
+ do this whenever a new session supplants an old session since there is only one active session at a time.
+
+ * UIProcess/Automation/WebAutomationSession.cpp:
+ (WebKit::WebAutomationSession::~WebAutomationSession):
+ * UIProcess/WebProcessPool.cpp:
+ (WebKit::WebProcessPool::setAutomationSession):
+
2018-02-20 John Wilander <[email protected]>
Make WebResourceLoadStatisticsStore::processStatisticsAndDataRecords() call WebProcessProxy::notifyPageStatisticsAndDataRecordsProcessed() in a proper callback
Modified: releases/WebKitGTK/webkit-2.20/Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp (229000 => 229001)
--- releases/WebKitGTK/webkit-2.20/Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp 2018-02-26 10:45:49 UTC (rev 229000)
+++ releases/WebKitGTK/webkit-2.20/Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp 2018-02-26 11:14:46 UTC (rev 229001)
@@ -71,9 +71,7 @@
WebAutomationSession::~WebAutomationSession()
{
ASSERT(!m_client);
-
- if (m_processPool)
- m_processPool->removeMessageReceiver(Messages::WebAutomationSession::messageReceiverName());
+ ASSERT(!m_processPool);
}
void WebAutomationSession::setClient(std::unique_ptr<API::AutomationSessionClient>&& client)
Modified: releases/WebKitGTK/webkit-2.20/Source/WebKit/UIProcess/WebProcessPool.cpp (229000 => 229001)
--- releases/WebKitGTK/webkit-2.20/Source/WebKit/UIProcess/WebProcessPool.cpp 2018-02-26 10:45:49 UTC (rev 229000)
+++ releases/WebKitGTK/webkit-2.20/Source/WebKit/UIProcess/WebProcessPool.cpp 2018-02-26 11:14:46 UTC (rev 229001)
@@ -1498,6 +1498,9 @@
void WebProcessPool::setAutomationSession(RefPtr<WebAutomationSession>&& automationSession)
{
+ if (m_automationSession)
+ m_automationSession->setProcessPool(nullptr);
+
m_automationSession = WTFMove(automationSession);
#if ENABLE(REMOTE_INSPECTOR)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes