diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:43:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:43:14 +0000 |
commit | 8dd16259287f58f9273002717ec4d27e97127719 (patch) | |
tree | 3863e62a53829a84037444beab3abd4ed9dfc7d0 /ipc/chromium | |
parent | Releasing progress-linux version 126.0.1-1~progress7.99u1. (diff) | |
download | firefox-8dd16259287f58f9273002717ec4d27e97127719.tar.xz firefox-8dd16259287f58f9273002717ec4d27e97127719.zip |
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ipc/chromium')
-rw-r--r-- | ipc/chromium/gtest/moz.build | 7 | ||||
-rw-r--r-- | ipc/chromium/gtest/ports_unittest.cc | 4 | ||||
-rw-r--r-- | ipc/chromium/src/base/revocable_store.cc | 4 | ||||
-rw-r--r-- | ipc/chromium/src/mojo/core/ports/node.cc | 9 | ||||
-rw-r--r-- | ipc/chromium/src/mojo/core/ports/node_delegate.h | 6 |
5 files changed, 26 insertions, 4 deletions
diff --git a/ipc/chromium/gtest/moz.build b/ipc/chromium/gtest/moz.build index afa175c638..a1af974b16 100644 --- a/ipc/chromium/gtest/moz.build +++ b/ipc/chromium/gtest/moz.build @@ -8,9 +8,14 @@ Library("ipcchromiumtest") SOURCES += [ "name_unittest.cc", - "ports_unittest.cc", ] +# Bug 1837550 - Fails under TSAN +if not CONFIG["MOZ_TSAN"]: + SOURCES += [ + "ports_unittest.cc", + ] + include("/ipc/chromium/chromium-config.mozbuild") FINAL_LIBRARY = "xul-gtest" diff --git a/ipc/chromium/gtest/ports_unittest.cc b/ipc/chromium/gtest/ports_unittest.cc index bfa8214799..705bab7edb 100644 --- a/ipc/chromium/gtest/ports_unittest.cc +++ b/ipc/chromium/gtest/ports_unittest.cc @@ -237,6 +237,10 @@ class TestNode : public NodeDelegate { } } + void ObserveRemoteNode(const NodeName& node) override { + DCHECK(node != node_name_); + } + void ClosePortsInEvent(Event* event) { if (event->type() != Event::Type::kUserMessage) { return; diff --git a/ipc/chromium/src/base/revocable_store.cc b/ipc/chromium/src/base/revocable_store.cc index b3d7414ee2..0b8a0655bd 100644 --- a/ipc/chromium/src/base/revocable_store.cc +++ b/ipc/chromium/src/base/revocable_store.cc @@ -25,9 +25,7 @@ RevocableStore::~RevocableStore() { owning_reference_->set_store(NULL); } -void RevocableStore::Add(Revocable* item) { - DCHECK(!item->revoked()); -} +void RevocableStore::Add(Revocable* item) { DCHECK(!item->revoked()); } void RevocableStore::RevokeAll() { // We revoke all the existing items in the store and reset our count. diff --git a/ipc/chromium/src/mojo/core/ports/node.cc b/ipc/chromium/src/mojo/core/ports/node.cc index 935771eeb7..036c981cbb 100644 --- a/ipc/chromium/src/mojo/core/ports/node.cc +++ b/ipc/chromium/src/mojo/core/ports/node.cc @@ -837,6 +837,10 @@ int Node::OnObserveProxy(const PortRef& port_ref, MaybeResendAckRequest(port_ref); delegate_->PortStatusChanged(port_ref); + + if (event->proxy_target_node_name() != name_) { + delegate_->ObserveRemoteNode(event->proxy_target_node_name()); + } } return OK; @@ -1513,6 +1517,11 @@ int Node::AcceptPort(const PortName& port_name, mozilla::MakeUnique<PortAcceptedEvent>( port_descriptor.referring_port_name, kInvalidPortName, kInvalidSequenceNum)); + + if (port_descriptor.peer_node_name != name_) { + delegate_->ObserveRemoteNode(port_descriptor.peer_node_name); + } + return OK; } diff --git a/ipc/chromium/src/mojo/core/ports/node_delegate.h b/ipc/chromium/src/mojo/core/ports/node_delegate.h index 3172779c06..37fb67613a 100644 --- a/ipc/chromium/src/mojo/core/ports/node_delegate.h +++ b/ipc/chromium/src/mojo/core/ports/node_delegate.h @@ -29,6 +29,12 @@ class NodeDelegate { // to query the latest status of the port. Note, this event could be spurious // if another thread is simultaneously modifying the status of the port. virtual void PortStatusChanged(const PortRef& port_ref) = 0; + + // Called after receiving a port with a remote peer, or bypassing a proxy to a + // remote peer. Embedders can use this to ensure a connection to the remote + // peer, reducing message queueing and ensuring prompt notification of peer + // node death. + virtual void ObserveRemoteNode(const NodeName& node) = 0; }; } // namespace ports |