feat(cv2-warm): Cb.startNativeSession CDP method for warm-snapshot cold-start #36
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "cv2/warm-snapshot-native-session"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Adds
Cb.startNativeSession— a CDP method that brings up the cb-chromium native WebRTC signaling session at runtime with per-session params, instead of only readingWEBRTC_SIGNALING_*from env at browser startup.This is the chromeless half of the warm-snapshot cold-start fix: it lets the isolator restore a WARM cb-chromium golden (chromium already painted, signaling env unset → idle CDP-only target) and inject per-session signaling AFTER restore over CDP — eliminating the ~30s in-guest chromium cold start the config-drive boot path forces.
Changes
MainParts::StartNativeSession(NativeSessionConfig). Boot path calls it fromLoadConfigFromEnv()— byte-identical when env is set. When env is unset, the worker no longer early-returns; it stays alive in the message loop as a warm CDP-only target.Cb.startNativeSessionCDP method (cb_devtools_agent), modeled onCb.startFrameSinkCapture. Parses params (CBOR→JSON via crdtp), maps to the same WsClientConfig+IceConfig the env path builds, reuses ParseIceServersJson/ParseIceTransportPolicy.Safety
Purely additive.
Cb.startNativeSessionis inert unless invoked — only the isolator (behind VMM_WEBRTC_WARM_RESTORE, default OFF) calls it. Existing env-driven sessions and the v5 BeginFrame fix are unaffected. Snapshot frozen in the warm-idle state bakes ZERO WebRTC network state (all peer ptrs nullptr).Compiles clean (cloud_browser_worker linked, image cr7727-82988a4780b6). Companion isolator change landed to tf-multiverse dev (95f9897).
🤖 Generated with Claude Code