Title: [275839] trunk/Source/WebKit
- Revision
- 275839
- Author
- [email protected]
- Date
- 2021-04-12 14:28:41 -0700 (Mon, 12 Apr 2021)
Log Message
Make sure AuxiliaryProcessProxy::sendMessage() is called on the main thread
https://bugs.webkit.org/show_bug.cgi?id=224448
Reviewed by Geoffrey Garen.
Make sure AuxiliaryProcessProxy::sendMessage() is called on the main thread. This is a follow-up to
Bug 224377 but for trunk.
* UIProcess/AuxiliaryProcessProxy.cpp:
(WebKit::AuxiliaryProcessProxy::sendMessage):
(WebKit::AuxiliaryProcessProxy::didFinishLaunching):
(WebKit::AuxiliaryProcessProxy::replyToPendingMessages):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (275838 => 275839)
--- trunk/Source/WebKit/ChangeLog 2021-04-12 21:28:25 UTC (rev 275838)
+++ trunk/Source/WebKit/ChangeLog 2021-04-12 21:28:41 UTC (rev 275839)
@@ -1,3 +1,18 @@
+2021-04-12 Chris Dumez <[email protected]>
+
+ Make sure AuxiliaryProcessProxy::sendMessage() is called on the main thread
+ https://bugs.webkit.org/show_bug.cgi?id=224448
+
+ Reviewed by Geoffrey Garen.
+
+ Make sure AuxiliaryProcessProxy::sendMessage() is called on the main thread. This is a follow-up to
+ Bug 224377 but for trunk.
+
+ * UIProcess/AuxiliaryProcessProxy.cpp:
+ (WebKit::AuxiliaryProcessProxy::sendMessage):
+ (WebKit::AuxiliaryProcessProxy::didFinishLaunching):
+ (WebKit::AuxiliaryProcessProxy::replyToPendingMessages):
+
2021-04-12 Ada Chan <[email protected]>
Initial implementation of WebChromeClient::enumerateImmersiveXRDevices() and XRDeviceProxy
Modified: trunk/Source/WebKit/UIProcess/AuxiliaryProcessProxy.cpp (275838 => 275839)
--- trunk/Source/WebKit/UIProcess/AuxiliaryProcessProxy.cpp 2021-04-12 21:28:25 UTC (rev 275838)
+++ trunk/Source/WebKit/UIProcess/AuxiliaryProcessProxy.cpp 2021-04-12 21:28:41 UTC (rev 275839)
@@ -160,14 +160,7 @@
bool AuxiliaryProcessProxy::sendMessage(UniqueRef<IPC::Encoder>&& encoder, OptionSet<IPC::SendOption> sendOptions, Optional<std::pair<CompletionHandler<void(IPC::Decoder*)>, uint64_t>>&& asyncReplyInfo, ShouldStartProcessThrottlerActivity shouldStartProcessThrottlerActivity)
{
- // FIXME: We should turn this into a RELEASE_ASSERT().
- ASSERT(isMainRunLoop());
- if (!isMainRunLoop()) {
- callOnMainRunLoop([protectedThis = makeRef(*this), encoder = WTFMove(encoder), sendOptions, asyncReplyInfo = WTFMove(asyncReplyInfo), shouldStartProcessThrottlerActivity]() mutable {
- protectedThis->sendMessage(WTFMove(encoder), sendOptions, WTFMove(asyncReplyInfo), shouldStartProcessThrottlerActivity);
- });
- return true;
- }
+ RELEASE_ASSERT(isMainRunLoop());
if (asyncReplyInfo && canSendMessage() && shouldStartProcessThrottlerActivity == ShouldStartProcessThrottlerActivity::Yes) {
auto completionHandler = std::exchange(asyncReplyInfo->first, nullptr);
@@ -235,7 +228,7 @@
void AuxiliaryProcessProxy::didFinishLaunching(ProcessLauncher*, IPC::Connection::Identifier connectionIdentifier)
{
ASSERT(!m_connection);
- ASSERT(isMainRunLoop());
+ RELEASE_ASSERT(isMainRunLoop());
if (!IPC::Connection::identifierIsValid(connectionIdentifier))
return;
@@ -256,7 +249,7 @@
void AuxiliaryProcessProxy::replyToPendingMessages()
{
- ASSERT(isMainRunLoop());
+ RELEASE_ASSERT(isMainRunLoop());
for (auto& pendingMessage : std::exchange(m_pendingMessages, { })) {
if (pendingMessage.asyncReplyInfo)
pendingMessage.asyncReplyInfo->first(nullptr);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes