⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 276153 in webkit


Ignore:
Timestamp:
Apr 16, 2021, 12:20:07 PM (5 years ago)
Author:
Chris Dumez
Message:

Unreviewed, reverting r275839.

The new release assertion is hitting to easily in client apps

Reverted changeset:

"Make sure AuxiliaryProcessProxy::sendMessage() is called on
the main thread"
https://bugs.webkit.org/show_bug.cgi?id=224448
https://commits.webkit.org/r275839

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r276148 r276153  
     12021-04-16  Chris Dumez  <cdumez@apple.com>
     2
     3        Unreviewed, reverting r275839.
     4
     5        The new release assertion is hitting to easily in client apps
     6
     7        Reverted changeset:
     8
     9        "Make sure AuxiliaryProcessProxy::sendMessage() is called on
     10        the main thread"
     11        https://bugs.webkit.org/show_bug.cgi?id=224448
     12        https://commits.webkit.org/r275839
     13
    1142021-04-16  Chris Dumez  <cdumez@apple.com>
    215
  • trunk/Source/WebKit/UIProcess/AuxiliaryProcessProxy.cpp

    r275839 r276153  
    161161bool AuxiliaryProcessProxy::sendMessage(UniqueRef<IPC::Encoder>&& encoder, OptionSet<IPC::SendOption> sendOptions, Optional<std::pair<CompletionHandler<void(IPC::Decoder*)>, uint64_t>>&& asyncReplyInfo, ShouldStartProcessThrottlerActivity shouldStartProcessThrottlerActivity)
    162162{
    163     RELEASE_ASSERT(isMainRunLoop());
     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    }
    164171
    165172    if (asyncReplyInfo && canSendMessage() && shouldStartProcessThrottlerActivity == ShouldStartProcessThrottlerActivity::Yes) {
     
    229236{
    230237    ASSERT(!m_connection);
    231     RELEASE_ASSERT(isMainRunLoop());
     238    ASSERT(isMainRunLoop());
    232239
    233240    if (!IPC::Connection::identifierIsValid(connectionIdentifier))
     
    250257void AuxiliaryProcessProxy::replyToPendingMessages()
    251258{
    252     RELEASE_ASSERT(isMainRunLoop());
     259    ASSERT(isMainRunLoop());
    253260    for (auto& pendingMessage : std::exchange(m_pendingMessages, { })) {
    254261        if (pendingMessage.asyncReplyInfo)
Note: See TracChangeset for help on using the changeset viewer.