Changeset 275839 in webkit
- Timestamp:
- Apr 12, 2021, 2:28:41 PM (5 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
UIProcess/AuxiliaryProcessProxy.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r275835 r275839 1 2021-04-12 Chris Dumez <cdumez@apple.com> 2 3 Make sure AuxiliaryProcessProxy::sendMessage() is called on the main thread 4 https://bugs.webkit.org/show_bug.cgi?id=224448 5 6 Reviewed by Geoffrey Garen. 7 8 Make sure AuxiliaryProcessProxy::sendMessage() is called on the main thread. This is a follow-up to 9 Bug 224377 but for trunk. 10 11 * UIProcess/AuxiliaryProcessProxy.cpp: 12 (WebKit::AuxiliaryProcessProxy::sendMessage): 13 (WebKit::AuxiliaryProcessProxy::didFinishLaunching): 14 (WebKit::AuxiliaryProcessProxy::replyToPendingMessages): 15 1 16 2021-04-12 Ada Chan <ada.chan@apple.com> 2 17 -
trunk/Source/WebKit/UIProcess/AuxiliaryProcessProxy.cpp
r275805 r275839 161 161 bool AuxiliaryProcessProxy::sendMessage(UniqueRef<IPC::Encoder>&& encoder, OptionSet<IPC::SendOption> sendOptions, Optional<std::pair<CompletionHandler<void(IPC::Decoder*)>, uint64_t>>&& asyncReplyInfo, ShouldStartProcessThrottlerActivity shouldStartProcessThrottlerActivity) 162 162 { 163 // FIXME: We should turn this into a RELEASE_ASSERT(). 164 ASSERT(isMainRunLoop()); 165 if (!isMainRunLoop()) { 166 callOnMainRunLoop([protectedThis = makeRef(*this), encoder = WTFMove(encoder), sendOptions, asyncReplyInfo = WTFMove(asyncReplyInfo), shouldStartProcessThrottlerActivity]() mutable { 167 protectedThis->sendMessage(WTFMove(encoder), sendOptions, WTFMove(asyncReplyInfo), shouldStartProcessThrottlerActivity); 168 }); 169 return true; 170 } 163 RELEASE_ASSERT(isMainRunLoop()); 171 164 172 165 if (asyncReplyInfo && canSendMessage() && shouldStartProcessThrottlerActivity == ShouldStartProcessThrottlerActivity::Yes) { … … 236 229 { 237 230 ASSERT(!m_connection); 238 ASSERT(isMainRunLoop());231 RELEASE_ASSERT(isMainRunLoop()); 239 232 240 233 if (!IPC::Connection::identifierIsValid(connectionIdentifier)) … … 257 250 void AuxiliaryProcessProxy::replyToPendingMessages() 258 251 { 259 ASSERT(isMainRunLoop());252 RELEASE_ASSERT(isMainRunLoop()); 260 253 for (auto& pendingMessage : std::exchange(m_pendingMessages, { })) { 261 254 if (pendingMessage.asyncReplyInfo)
Note:
See TracChangeset
for help on using the changeset viewer.