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

Changeset 282377 in webkit


Ignore:
Timestamp:
Sep 13, 2021, 9:15:43 PM (5 years ago)
Author:
Chris Dumez
Message:

[WK2] Reduce amount of IPC needed by BroadcastChannel
​https://bugs.webkit.org/show_bug.cgi?id=230181

Reviewed by Alex Christensen.

Source/WebCore:

Introduce ScriptExecutionContext::ensureOnContextThread() which is similar to
ScriptExecutionContext::postTaskTo() but doesn't call postTask() if we're already
on the ScriptExecutionContext's context thread. Use it in BroadcastChannel::dispatchMessageTo()
to avoid unnecessary thread hopping when the BroadcastChannel belongs to a Window
environment.

  • dom/BroadcastChannel.cpp:

(WebCore::BroadcastChannel::dispatchMessageTo):

  • dom/ScriptExecutionContext.cpp:

(WebCore::ScriptExecutionContext::ensureOnContextThread):

  • dom/ScriptExecutionContext.h:

Source/WebKit:

Reduce amount of IPC needed by BroadcastChannel for both registration / unregistration
and communication. Each WebBroadcastChannelRegistry in the WebProcess now maintains
a map of BroadcastChannels within the WebProcess. As a result, we are able to dispatch
messages to other BroadcastChannels within the same process without going via the
NetworkProcess.

Also, the NetworkBroadcastChannelRegistry on the NetworkProcess side no longer needs
to store individual BroadcastChannelIdentifiers. It merely needs to know which
WebProcesses have one or more BroadcastChannels for a given ClientOrigin / name.
When NetworkBroadcastChannelRegistry::postMessage() is called, we no longer send
IPC to the source process in case there are other BroadcastChannels than the source
with the given ClientOrigin / name in that process. Also, if there is more than
one BroadcastChannel for the given ClientOrigin / name within a given destination
WebProcess, we now send a single IPC message instead of sending one per BroadcastChannel.

  • NetworkProcess/NetworkBroadcastChannelRegistry.cpp:

(WebKit::NetworkBroadcastChannelRegistry::registerChannel):
(WebKit::NetworkBroadcastChannelRegistry::unregisterChannel):
(WebKit::NetworkBroadcastChannelRegistry::postMessage):
(WebKit::NetworkBroadcastChannelRegistry::removeConnection):

  • NetworkProcess/NetworkBroadcastChannelRegistry.h:
  • NetworkProcess/NetworkBroadcastChannelRegistry.messages.in:
  • WebProcess/WebCoreSupport/WebBroadcastChannelRegistry.cpp:

(WebKit::WebBroadcastChannelRegistry::registerChannel):
(WebKit::WebBroadcastChannelRegistry::unregisterChannel):
(WebKit::WebBroadcastChannelRegistry::postMessage):
(WebKit::WebBroadcastChannelRegistry::postMessageLocally):
(WebKit::WebBroadcastChannelRegistry::postMessageToRemote):

  • WebProcess/WebCoreSupport/WebBroadcastChannelRegistry.h:
  • WebProcess/WebCoreSupport/WebBroadcastChannelRegistry.messages.in:
Location:
trunk
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/coop-navigated-history-popup.https-expected.txt

    r280504 r282377  
     1CONSOLE MESSAGE: Can't close the window since it was not opened by JavaScript
    12
    23PASS Popup navigating to other origin with COOP: same-origin and back in history
  • trunk/Source/WebCore/ChangeLog

    r282374 r282377  
     12021-09-13  Chris Dumez  <cdumez@apple.com>
     2
     3        [WK2] Reduce amount of IPC needed by BroadcastChannel
     4        https://bugs.webkit.org/show_bug.cgi?id=230181
     5
     6        Reviewed by Alex Christensen.
     7
     8        Introduce ScriptExecutionContext::ensureOnContextThread() which is similar to
     9        ScriptExecutionContext::postTaskTo() but doesn't call postTask() if we're already
     10        on the ScriptExecutionContext's context thread. Use it in BroadcastChannel::dispatchMessageTo()
     11        to avoid unnecessary thread hopping when the BroadcastChannel belongs to a Window
     12        environment.
     13
     14        * dom/BroadcastChannel.cpp:
     15        (WebCore::BroadcastChannel::dispatchMessageTo):
     16        * dom/ScriptExecutionContext.cpp:
     17        (WebCore::ScriptExecutionContext::ensureOnContextThread):
     18        * dom/ScriptExecutionContext.h:
     19
    1202021-09-13  Jean-Yves Avenard  <jya@apple.com>
    221
  • trunk/Source/WebCore/dom/BroadcastChannel.cpp

    r282366 r282377  
    227227
    228228    auto callbackAggregator = CallbackAggregator::create(WTFMove(completionHandler));
    229     ScriptExecutionContext::postTaskTo(contextIdentifier, [channelIdentifier, message = WTFMove(message), callbackAggregator = WTFMove(callbackAggregator)](auto&) mutable {
     229    ScriptExecutionContext::ensureOnContextThread(contextIdentifier, [channelIdentifier, message = WTFMove(message), callbackAggregator = WTFMove(callbackAggregator)](auto&) mutable {
    230230        RefPtr<BroadcastChannel> channel;
    231231        {
  • trunk/Source/WebCore/dom/ScriptExecutionContext.cpp

    r281879 r282377  
    651651}
    652652
     653bool ScriptExecutionContext::ensureOnContextThread(ScriptExecutionContextIdentifier identifier, Task&& task)
     654{
     655    ScriptExecutionContext* context = nullptr;
     656    {
     657        Locker locker { allScriptExecutionContextsMapLock };
     658        context = allScriptExecutionContextsMap().get(identifier);
     659
     660        if (!context)
     661            return false;
     662
     663        if (!context->isContextThread()) {
     664            context->postTask(WTFMove(task));
     665            return true;
     666        }
     667    }
     668
     669    task.performTask(*context);
     670    return true;
     671}
     672
    653673} // namespace WebCore
  • trunk/Source/WebCore/dom/ScriptExecutionContext.h

    r282222 r282377  
    282282#endif
    283283    WEBCORE_EXPORT static bool postTaskTo(ScriptExecutionContextIdentifier, Task&&);
     284    WEBCORE_EXPORT static bool ensureOnContextThread(ScriptExecutionContextIdentifier, Task&&);
    284285
    285286    ScriptExecutionContextIdentifier contextIdentifier() const;
  • trunk/Source/WebKit/ChangeLog

    r282375 r282377  
     12021-09-13  Chris Dumez  <cdumez@apple.com>
     2
     3        [WK2] Reduce amount of IPC needed by BroadcastChannel
     4        https://bugs.webkit.org/show_bug.cgi?id=230181
     5
     6        Reviewed by Alex Christensen.
     7
     8        Reduce amount of IPC needed by BroadcastChannel for both registration / unregistration
     9        and communication. Each WebBroadcastChannelRegistry in the WebProcess now maintains
     10        a map of BroadcastChannels within the WebProcess. As a result, we are able to dispatch
     11        messages to other BroadcastChannels within the same process without going via the
     12        NetworkProcess.
     13
     14        Also, the NetworkBroadcastChannelRegistry on the NetworkProcess side no longer needs
     15        to store individual BroadcastChannelIdentifiers. It merely needs to know which
     16        WebProcesses have one or more BroadcastChannels for a given ClientOrigin / name.
     17        When NetworkBroadcastChannelRegistry::postMessage() is called, we no longer send
     18        IPC to the source process in case there are other BroadcastChannels than the source
     19        with the given ClientOrigin / name in that process. Also, if there is more than
     20        one BroadcastChannel for the given ClientOrigin / name within a given destination
     21        WebProcess, we now send a single IPC message instead of sending one per BroadcastChannel.
     22
     23        * NetworkProcess/NetworkBroadcastChannelRegistry.cpp:
     24        (WebKit::NetworkBroadcastChannelRegistry::registerChannel):
     25        (WebKit::NetworkBroadcastChannelRegistry::unregisterChannel):
     26        (WebKit::NetworkBroadcastChannelRegistry::postMessage):
     27        (WebKit::NetworkBroadcastChannelRegistry::removeConnection):
     28        * NetworkProcess/NetworkBroadcastChannelRegistry.h:
     29        * NetworkProcess/NetworkBroadcastChannelRegistry.messages.in:
     30        * WebProcess/WebCoreSupport/WebBroadcastChannelRegistry.cpp:
     31        (WebKit::WebBroadcastChannelRegistry::registerChannel):
     32        (WebKit::WebBroadcastChannelRegistry::unregisterChannel):
     33        (WebKit::WebBroadcastChannelRegistry::postMessage):
     34        (WebKit::WebBroadcastChannelRegistry::postMessageLocally):
     35        (WebKit::WebBroadcastChannelRegistry::postMessageToRemote):
     36        * WebProcess/WebCoreSupport/WebBroadcastChannelRegistry.h:
     37        * WebProcess/WebCoreSupport/WebBroadcastChannelRegistry.messages.in:
     38
    1392021-09-13  Wenson Hsieh  <wenson_hsieh@apple.com>
    240
  • trunk/Source/WebKit/NetworkProcess/NetworkBroadcastChannelRegistry.cpp

    r282105 r282377  
    3535NetworkBroadcastChannelRegistry::NetworkBroadcastChannelRegistry() = default;
    3636
    37 void NetworkBroadcastChannelRegistry::registerChannel(IPC::Connection& connection, const WebCore::ClientOrigin& origin, const String& name, WebCore::BroadcastChannelIdentifier channelIdentifier)
     37void NetworkBroadcastChannelRegistry::registerChannel(IPC::Connection& connection, const WebCore::ClientOrigin& origin, const String& name)
    3838{
    39     auto& channelsForOrigin = m_broadcastChannels.ensure(origin, [] { return NameToChannelIdentifiersMap { }; }).iterator->value;
    40     auto& channelsForName = channelsForOrigin.ensure(name, [] { return Vector<GlobalBroadcastChannelIdentifier> { }; }).iterator->value;
    41     GlobalBroadcastChannelIdentifier globalChannelIdentifier { connection.uniqueID(), channelIdentifier };
    42     ASSERT(!channelsForName.contains(globalChannelIdentifier));
    43     channelsForName.append(WTFMove(globalChannelIdentifier));
     39    auto& channelsForOrigin = m_broadcastChannels.ensure(origin, [] { return NameToConnectionIdentifiersMap { }; }).iterator->value;
     40    auto& connectionIdentifiersForName = channelsForOrigin.ensure(name, [] { return Vector<IPC::Connection::UniqueID> { }; }).iterator->value;
     41    ASSERT(!connectionIdentifiersForName.contains(connection.uniqueID()));
     42    connectionIdentifiersForName.append(connection.uniqueID());
    4443}
    4544
    46 void NetworkBroadcastChannelRegistry::unregisterChannel(IPC::Connection& connection, const WebCore::ClientOrigin& origin, const String& name, WebCore::BroadcastChannelIdentifier channelIdentifier)
     45void NetworkBroadcastChannelRegistry::unregisterChannel(IPC::Connection& connection, const WebCore::ClientOrigin& origin, const String& name)
    4746{
    4847    auto channelsForOriginIterator = m_broadcastChannels.find(origin);
    … …  
    5049    if (channelsForOriginIterator == m_broadcastChannels.end())
    5150        return;
    52     auto channelsForNameIterator = channelsForOriginIterator->value.find(name);
    53     ASSERT(channelsForNameIterator != channelsForOriginIterator->value.end());
    54     if (channelsForNameIterator == channelsForOriginIterator->value.end())
     51    auto connectionIdentifiersForNameIterator = channelsForOriginIterator->value.find(name);
     52    ASSERT(connectionIdentifiersForNameIterator != channelsForOriginIterator->value.end());
     53    if (connectionIdentifiersForNameIterator == channelsForOriginIterator->value.end())
    5554        return;
    5655
    57     GlobalBroadcastChannelIdentifier globalChannelIdentifier { connection.uniqueID(), channelIdentifier };
    58     ASSERT(channelsForNameIterator->value.contains(globalChannelIdentifier));
    59     channelsForNameIterator->value.removeFirst(globalChannelIdentifier);
     56    ASSERT(connectionIdentifiersForNameIterator->value.contains(connection.uniqueID()));
     57    connectionIdentifiersForNameIterator->value.removeFirst(connection.uniqueID());
    6058}
    6159
    62 void NetworkBroadcastChannelRegistry::postMessage(IPC::Connection& connection, const WebCore::ClientOrigin& origin, const String& name, WebCore::BroadcastChannelIdentifier source, WebCore::MessageWithMessagePorts&& message, CompletionHandler<void()>&& completionHandler)
     60void NetworkBroadcastChannelRegistry::postMessage(IPC::Connection& connection, const WebCore::ClientOrigin& origin, const String& name, WebCore::MessageWithMessagePorts&& message, CompletionHandler<void()>&& completionHandler)
    6361{
    6462    auto channelsForOriginIterator = m_broadcastChannels.find(origin);
    … …  
    6664    if (channelsForOriginIterator == m_broadcastChannels.end())
    6765        return completionHandler();
    68     auto channelsForNameIterator = channelsForOriginIterator->value.find(name);
    69     ASSERT(channelsForNameIterator != channelsForOriginIterator->value.end());
    70     if (channelsForNameIterator == channelsForOriginIterator->value.end())
     66    auto connectionIdentifiersForNameIterator = channelsForOriginIterator->value.find(name);
     67    ASSERT(connectionIdentifiersForNameIterator != channelsForOriginIterator->value.end());
     68    if (connectionIdentifiersForNameIterator == channelsForOriginIterator->value.end())
    7169        return completionHandler();
    7270
    7371    auto callbackAggregator = CallbackAggregator::create(WTFMove(completionHandler));
    74     GlobalBroadcastChannelIdentifier sourceGlobalChannelIdentifier { connection.uniqueID(), source };
    75     for (auto& globalIdentifier : channelsForNameIterator->value) {
    76         if (globalIdentifier == sourceGlobalChannelIdentifier)
     72    for (auto& connectionID : connectionIdentifiersForNameIterator->value) {
     73        // Only dispatch the post the messages to BroadcastChannels outside the source process.
     74        if (connectionID == connection.uniqueID())
    7775            continue;
    7876
    79         RefPtr connection = IPC::Connection::connection(globalIdentifier.connectionIdentifier);
     77        RefPtr connection = IPC::Connection::connection(connectionID);
    8078        if (!connection)
    8179            continue;
    8280
    83         connection->sendWithAsyncReply(Messages::WebBroadcastChannelRegistry::PostMessageToRemote(globalIdentifier.channelIndentifierInProcess, message), [callbackAggregator] { }, 0);
     81        connection->sendWithAsyncReply(Messages::WebBroadcastChannelRegistry::PostMessageToRemote(origin, name, message), [callbackAggregator] { }, 0);
    8482    }
    8583}
    … …  
    9189        Vector<String> namesToRemove;
    9290        for (auto& innerEntry : entry.value) {
    93             innerEntry.value.removeAllMatching([connectionIdentifier = connection.uniqueID()](auto& globalIdentifier) {
    94                 return globalIdentifier.connectionIdentifier == connectionIdentifier;
    95             });
     91            innerEntry.value.removeFirst(connection.uniqueID());
    9692            if (innerEntry.value.isEmpty())
    9793                namesToRemove.append(innerEntry.key);
  • trunk/Source/WebKit/NetworkProcess/NetworkBroadcastChannelRegistry.h

    r282105 r282377  
    4646    void didReceiveMessage(IPC::Connection&, IPC::Decoder&);
    4747
    48     void registerChannel(IPC::Connection&, const WebCore::ClientOrigin&, const String& name, WebCore::BroadcastChannelIdentifier);
    49     void unregisterChannel(IPC::Connection&, const WebCore::ClientOrigin&, const String& name, WebCore::BroadcastChannelIdentifier);
    50     void postMessage(IPC::Connection&, const WebCore::ClientOrigin&, const String& name, WebCore::BroadcastChannelIdentifier source, WebCore::MessageWithMessagePorts&&, CompletionHandler<void()>&&);
     48    void registerChannel(IPC::Connection&, const WebCore::ClientOrigin&, const String& name);
     49    void unregisterChannel(IPC::Connection&, const WebCore::ClientOrigin&, const String& name);
     50    void postMessage(IPC::Connection&, const WebCore::ClientOrigin&, const String& name, WebCore::MessageWithMessagePorts&&, CompletionHandler<void()>&&);
    5151
    5252private:
    53     struct GlobalBroadcastChannelIdentifier {
    54         IPC::Connection::UniqueID connectionIdentifier;
    55         WebCore::BroadcastChannelIdentifier channelIndentifierInProcess;
    56 
    57         bool operator==(const GlobalBroadcastChannelIdentifier& other) const
    58         {
    59             return connectionIdentifier == other.connectionIdentifier && channelIndentifierInProcess == other.channelIndentifierInProcess;
    60         }
    61     };
    62 
    63     using NameToChannelIdentifiersMap = HashMap<String, Vector<GlobalBroadcastChannelIdentifier>>;
    64     HashMap<WebCore::ClientOrigin, NameToChannelIdentifiersMap> m_broadcastChannels;
     53    using NameToConnectionIdentifiersMap = HashMap<String, Vector<IPC::Connection::UniqueID>>;
     54    HashMap<WebCore::ClientOrigin, NameToConnectionIdentifiersMap> m_broadcastChannels;
    6555};
    6656
  • trunk/Source/WebKit/NetworkProcess/NetworkBroadcastChannelRegistry.messages.in

    r282105 r282377  
    2222
    2323messages -> NetworkBroadcastChannelRegistry NotRefCounted {
    24     RegisterChannel(struct WebCore::ClientOrigin origin, String name, WebCore::BroadcastChannelIdentifier channelIdentifier) WantsConnection
    25     UnregisterChannel(struct WebCore::ClientOrigin origin, String name, WebCore::BroadcastChannelIdentifier channelIdentifier) WantsConnection
    26     PostMessage(struct WebCore::ClientOrigin origin, String name, WebCore::BroadcastChannelIdentifier source, struct WebCore::MessageWithMessagePorts message) -> () Async WantsConnection
     24    RegisterChannel(struct WebCore::ClientOrigin origin, String name) WantsConnection
     25    UnregisterChannel(struct WebCore::ClientOrigin origin, String name) WantsConnection
     26    PostMessage(struct WebCore::ClientOrigin origin, String name, struct WebCore::MessageWithMessagePorts message) -> () Async WantsConnection
    2727}
  • trunk/Source/WebKit/WebProcess/WebCoreSupport/WebBroadcastChannelRegistry.cpp

    r282105 r282377  
    3232#include <WebCore/BroadcastChannel.h>
    3333#include <WebCore/MessageWithMessagePorts.h>
     34#include <wtf/CallbackAggregator.h>
    3435
    3536namespace WebKit {
    … …  
    4243void WebBroadcastChannelRegistry::registerChannel(const WebCore::ClientOrigin& origin, const String& name, WebCore::BroadcastChannelIdentifier identifier)
    4344{
    44     networkProcessConnection().send(Messages::NetworkBroadcastChannelRegistry::RegisterChannel { origin, name, identifier }, 0);
     45    auto& channelsForOrigin = m_channelsPerOrigin.ensure(origin, [] { return HashMap<String, Vector<WebCore::BroadcastChannelIdentifier>> { }; }).iterator->value;
     46    auto& channelsForName = channelsForOrigin.ensure(name, [] { return Vector<WebCore::BroadcastChannelIdentifier> { }; }).iterator->value;
     47    channelsForName.append(identifier);
     48
     49    if (channelsForName.size() == 1)
     50        networkProcessConnection().send(Messages::NetworkBroadcastChannelRegistry::RegisterChannel { origin, name }, 0);
    4551}
    4652
    4753void WebBroadcastChannelRegistry::unregisterChannel(const WebCore::ClientOrigin& origin, const String& name, WebCore::BroadcastChannelIdentifier identifier)
    4854{
    49     networkProcessConnection().send(Messages::NetworkBroadcastChannelRegistry::UnregisterChannel { origin, name, identifier }, 0);
     55    auto channelsPerOriginIterator = m_channelsPerOrigin.find(origin);
     56    if (channelsPerOriginIterator == m_channelsPerOrigin.end())
     57        return;
     58
     59    auto& channelsForOrigin = channelsPerOriginIterator->value;
     60    auto channelsForOriginIterator = channelsForOrigin.find(name);
     61    if (channelsForOriginIterator == channelsForOrigin.end())
     62        return;
     63
     64    auto& channelIdentifiersForName = channelsForOriginIterator->value;
     65    if (!channelIdentifiersForName.removeFirst(identifier))
     66        return;
     67    if (!channelIdentifiersForName.isEmpty())
     68        return;
     69
     70    channelsForOrigin.remove(channelsForOriginIterator);
     71    networkProcessConnection().send(Messages::NetworkBroadcastChannelRegistry::UnregisterChannel { origin, name }, 0);
     72
     73    if (channelsForOrigin.isEmpty())
     74        m_channelsPerOrigin.remove(channelsPerOriginIterator);
    5075}
    5176
    5277void WebBroadcastChannelRegistry::postMessage(const WebCore::ClientOrigin& origin, const String& name, WebCore::BroadcastChannelIdentifier source, Ref<WebCore::SerializedScriptValue>&& message, CompletionHandler<void()>&& completionHandler)
    5378{
    54     networkProcessConnection().sendWithAsyncReply(Messages::NetworkBroadcastChannelRegistry::PostMessage { origin, name, source, WebCore::MessageWithMessagePorts { WTFMove(message), { } } }, WTFMove(completionHandler), 0);
     79    auto callbackAggregator = CallbackAggregator::create(WTFMove(completionHandler));
     80    postMessageLocally(origin, name, source, message.copyRef(), callbackAggregator.copyRef());
     81    networkProcessConnection().sendWithAsyncReply(Messages::NetworkBroadcastChannelRegistry::PostMessage { origin, name, WebCore::MessageWithMessagePorts { WTFMove(message), { } } }, [callbackAggregator] { }, 0);
    5582}
    5683
    57 void WebBroadcastChannelRegistry::postMessageToRemote(WebCore::BroadcastChannelIdentifier identifier, WebCore::MessageWithMessagePorts&& message, CompletionHandler<void()>&& completionHandler)
     84void WebBroadcastChannelRegistry::postMessageLocally(const WebCore::ClientOrigin& origin, const String& name, std::optional<WebCore::BroadcastChannelIdentifier> sourceInProcess, Ref<WebCore::SerializedScriptValue>&& message, Ref<WTF::CallbackAggregator>&& callbackAggregator)
    5885{
    59     WebCore::BroadcastChannel::dispatchMessageTo(identifier, message.message.releaseNonNull(), WTFMove(completionHandler));
     86    auto channelsPerOriginIterator = m_channelsPerOrigin.find(origin);
     87    if (channelsPerOriginIterator == m_channelsPerOrigin.end())
     88        return;
     89
     90    auto& channelsForOrigin = channelsPerOriginIterator->value;
     91    auto channelsForOriginIterator = channelsForOrigin.find(name);
     92    if (channelsForOriginIterator == channelsForOrigin.end())
     93        return;
     94
     95    auto channelIdentifiersForName = channelsForOriginIterator->value;
     96    for (auto& channelIdentier : channelIdentifiersForName) {
     97        if (channelIdentier == sourceInProcess)
     98            continue;
     99        WebCore::BroadcastChannel::dispatchMessageTo(channelIdentier, message.copyRef(), [callbackAggregator] { });
     100    }
     101}
     102
     103void WebBroadcastChannelRegistry::postMessageToRemote(const WebCore::ClientOrigin& origin, const String& name, WebCore::MessageWithMessagePorts&& message, CompletionHandler<void()>&& completionHandler)
     104{
     105    auto callbackAggregator = CallbackAggregator::create(WTFMove(completionHandler));
     106    postMessageLocally(origin, name, std::nullopt, *message.message, callbackAggregator.copyRef());
    60107}
    61108
  • trunk/Source/WebKit/WebProcess/WebCoreSupport/WebBroadcastChannelRegistry.h

    r282105 r282377  
    2828#include "Connection.h"
    2929#include <WebCore/BroadcastChannelRegistry.h>
     30#include <WebCore/ClientOrigin.h>
     31#include <wtf/HashMap.h>
     32#include <wtf/Vector.h>
     33
     34namespace WTF {
     35class CallbackAggregator;
     36}
    3037
    3138namespace WebCore {
    … …  
    5158    WebBroadcastChannelRegistry() = default;
    5259
    53     void postMessageToRemote(WebCore::BroadcastChannelIdentifier, WebCore::MessageWithMessagePorts&&, CompletionHandler<void()>&&);
     60    void postMessageToRemote(const WebCore::ClientOrigin&, const String& name, WebCore::MessageWithMessagePorts&&, CompletionHandler<void()>&&);
     61    void postMessageLocally(const WebCore::ClientOrigin&, const String& name, std::optional<WebCore::BroadcastChannelIdentifier> sourceInProcess, Ref<WebCore::SerializedScriptValue>&&, Ref<WTF::CallbackAggregator>&&);
     62
     63    HashMap<WebCore::ClientOrigin, HashMap<String, Vector<WebCore::BroadcastChannelIdentifier>>> m_channelsPerOrigin;
    5464};
    5565
  • trunk/Source/WebKit/WebProcess/WebCoreSupport/WebBroadcastChannelRegistry.messages.in

    r280547 r282377  
    2222
    2323messages -> WebBroadcastChannelRegistry {
    24     PostMessageToRemote(WebCore::BroadcastChannelIdentifier destination, struct WebCore::MessageWithMessagePorts message) -> () Async
     24    PostMessageToRemote(struct WebCore::ClientOrigin origin, String name, struct WebCore::MessageWithMessagePorts message) -> () Async
    2525}
Note: See TracChangeset for help on using the changeset viewer.