mojo: Introduce DirectReceiver

Experimental type which enables select use cases to establish Mojo
interface receiver that receives its IPCs directly on its binding thread
without a hop through the process's IO thread first.

This is not ever meant to be used widely and a more robust approach
could be to have Mojo manage thread-local node overrides, pending a
bunch of other changes that would be needed first.

For now this is defined so that Chrome developers can experiment with
specific use cases, like the renderer's input handler on its compositor

Bug: None
Change-Id: I11c7d6bc41bd2855541a98752f87e2420f1096fb
Reviewed-by: Daniel Cheng <>
Commit-Queue: Ken Rockot <>
Cr-Commit-Position: refs/heads/main@{#1138821}
GitOrigin-RevId: 287f52543c2e20fcf6fb96e3d03b973e2dc14d80
diff --git a/src/ipcz/ b/src/ipcz/
index ae68187..8035fa1 100644
--- a/src/ipcz/
+++ b/src/ipcz/
@@ -1447,8 +1447,21 @@
-  if (bridge_link && outward_link && !inward_link && !decaying_inward_link &&
-      !decaying_outward_link) {
+  // If we have an outward link, and we have no decaying outward link (or our
+  // decaying outward link has just finished decaying above), we consider the
+  // the outward link to be stable.
+  const bool has_stable_outward_link =
+      outward_link && (!decaying_outward_link || outward_link_decayed);
+  // If we have no primary inward link, and we have no decaying inward link
+  // (or our decaying inward link has just finished decaying above), this
+  // router has no inward-facing links.
+  const bool has_no_inward_links =
+      !inward_link && (!decaying_inward_link || inward_link_decayed);
+  // Bridge bypass is only possible with no inward links and a stable outward
+  // link.
+  if (bridge_link && has_stable_outward_link && has_no_inward_links) {