Skip to main content

Module cdp_memory

Module cdp_memory 

Source
Expand description

Production InMemoryBridge — the memory:// CDP transport’s host side.

Browser::connect("memory://bao") (eager form, via the client’s process-global registry) dispatches every CDP command here. This bridge routes through the REAL protocol dispatcher (bao_cdp::handle_command) with a REAL BridgeSender, so:

  • Pure-protocol domains (Browser.getVersion, …) answer instantly.
  • Servo-touching commands (Runtime.evaluate, Target.getTargets listing, …) ride the bridge channel to whoever drains it — the runtime’s event loop (BaoRuntime::run) drains it on its own thread. When nothing drains (a bare BaoRuntime::new consumer that never pumps), those commands fail FAST with an honest timeout error (the channel is created with a short timeout) instead of returning fabricated results — the bridge-less protocol fallback fabricates undefined for Runtime.evaluate, which is exactly the silent-fake class this workspace eradicates.

@trace REQ-CDP-001 [level:library]

Structs§

MemoryCdpBridge
The host-side bridge installed into bao_cdp_client’s process registry by crate::BaoRuntime::new.