v159 · dom · media session
Caller-pattern migration matrix
The chromestatus compatibility note says fire-and-forget callers are unaffected. That is true for the happy path. This matrix runs five real calling patterns against three real scenarios in your browser and records exactly where each error ends up — caught, silently dropped, an unhandled rejection, or a crash. It is the migration checklist for code written against either signature.
Probing this browser…
| Caller pattern | Valid call (false) | Too few arguments () | Detached document (true) |
|---|
how to read it
- ok / caught — the pattern got a result or handled the error.
- silent no-op — something went wrong but the call gave no signal (the legacy detached case).
- unhandled / crash — in production this would be an
unhandledrejectionor an exception escaping the caller. The harness attaches a silent observer to the returned promise so this page’s console stays clean; your code would not have one.
The recommended pattern for code that must run on both sides of the change is the last row: await Promise.resolve().then(() => session.setMicrophoneActive(active)) inside try catches synchronous throws (Chrome ≤158) and rejections (Chrome 159) alike, and never calls .then on undefined.