Skip to content

Commit

Permalink
Cherry-pick 272313@main (64a7397). https://bugs.webkit.org/show_bug.c…
Browse files Browse the repository at this point in the history
…gi?id=266603

    Ensure NetworkStorageManager gets destroyed on the main thread
    https://bugs.webkit.org/show_bug.cgi?id=266603
    rdar://117839300

    Reviewed by Chris Dumez and Alex Christensen.

    Dispatch a task to main thread to release ref of NetworkStorageManager in stopReceivingMessageFromConnection, which may
    help fix the crash under IDBStorageRegistry::removeConnectionToClient in rdar://117839300.

    * Source/WebKit/NetworkProcess/storage/NetworkStorageManager.cpp:
    (WebKit::NetworkStorageManager::stopReceivingMessageFromConnection):

    Canonical link: https://commits.webkit.org/272313@main
  • Loading branch information
szewai authored and aperezdc committed Jan 27, 2024
1 parent 9d55c4d commit 6c05729
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,8 @@ void NetworkStorageManager::stopReceivingMessageFromConnection(IPC::Connection&
return shouldRemove;
});
m_temporaryBlobPathsByConnection.remove(connection);

RunLoop::main().dispatch([protectedThis = WTFMove(protectedThis)] { });
});
}

Expand Down

0 comments on commit 6c05729

Please sign in to comment.