Parent: #267. Webview epic: #264.
Problem
After an allowed nested navigation or non-cancelable detach, the outgoing document needs one ordered lifecycle path: pagehide, transition to hidden with visibilitychange, then unload, before task/resource retirement and generation replacement. Descendants must unload before owners, handlers must see the outgoing document and stable WindowProxy, and reentrant same-frame work must not admit a new generation or resource.
Implemented boundary
- Consolidate outgoing lifecycle into a guarded
pagehide → hidden visibilitychange → unload sequence.
- Apply it to allowed navigation and non-cancelable detach/discard.
- Unload detached descendants before their owners.
- Retain the outgoing Document/WindowProxy through handlers.
- Block same-frame reentrant generation/resource admission and restore the initiating
src.
- Cancel outgoing-context tasks before generation advance.
- Bound hidden-root and one-shot state through activation and teardown.
- Add WPT-shaped/native source contracts and a validation/deferred-work note.
Explicit reload/history lifecycle, cross-origin WindowProxy behavior, and cumulative unchanged Markdown/notebook/custom-editor/extension webview acceptance.
Validation boundary
git diff --check passed. Authored contracts were not executed under the current implementation-throughput direction.
Parent: #267. Webview epic: #264.
Problem
After an allowed nested navigation or non-cancelable detach, the outgoing document needs one ordered lifecycle path:
pagehide, transition to hidden withvisibilitychange, thenunload, before task/resource retirement and generation replacement. Descendants must unload before owners, handlers must see the outgoing document and stable WindowProxy, and reentrant same-frame work must not admit a new generation or resource.Implemented boundary
pagehide → hidden visibilitychange → unloadsequence.src.Deferred to #267/#268
Explicit reload/history lifecycle, cross-origin WindowProxy behavior, and cumulative unchanged Markdown/notebook/custom-editor/extension webview acceptance.
Validation boundary
git diff --checkpassed. Authored contracts were not executed under the current implementation-throughput direction.