This will remove unnecessary hops for service worker messages.
Created attachment 377571 [details] Patch
Created attachment 377850 [details] Patch
Created attachment 377853 [details] Patch
Only downside is that, currently, on network process crash, the registry information is gone and would need to be rebuilt on network process crash recovery.
Comment on attachment 377853 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=377853&action=review > Source/WebKit/UIProcess/API/APIContextMenuElementInfo.h:35 > +#include <wtf/RetainPtr.h> here and below: unified build fix apparently.
Comment on attachment 377853 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=377853&action=review > Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp:962 > +void NetworkConnectionToWebProcess::checkRemotePortForActivity(const WebCore::MessagePortIdentifier port, CompletionHandler<void(bool)>&& callback) It would make things a bit cleaner to make this CompletionHandler<void(HasActivity)> > Source/WebKit/NetworkProcess/NetworkMessagePortChannelProvider.cpp:68 > + // Should never be called in the UI process provider. > + ASSERT_NOT_REACHED(); Can we remove all these? Could we at least write code that calls the CompletionHandlers?
(In reply to Alex Christensen from comment #6) > Comment on attachment 377853 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=377853&action=review > > > Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp:962 > > +void NetworkConnectionToWebProcess::checkRemotePortForActivity(const WebCore::MessagePortIdentifier port, CompletionHandler<void(bool)>&& callback) > > It would make things a bit cleaner to make this > CompletionHandler<void(HasActivity)> OK > > Source/WebKit/NetworkProcess/NetworkMessagePortChannelProvider.cpp:68 > > + // Should never be called in the UI process provider. > > + ASSERT_NOT_REACHED(); > > Can we remove all these? > Could we at least write code that calls the CompletionHandlers? Patch at bug 201400 will fix this.
Created attachment 377969 [details] Patch for landing
Comment on attachment 377969 [details] Patch for landing Clearing flags on attachment: 377969 Committed r249479: <https://trac.webkit.org/changeset/249479>
All reviewed patches have been landed. Closing bug.
<rdar://problem/55015929>
Comment on attachment 377969 [details] Patch for landing View in context: https://bugs.webkit.org/attachment.cgi?id=377969&action=review > Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp:945 > + auto callback = m_messageBatchDeliveryCompletionHandlers.take(messageBatchIdentifier); > + ASSERT(callback); > + callback(); This caused https://bugs.webkit.org/show_bug.cgi?id=204460