Repository navigation
Commit b948375
committed
fix(runtime): borrow enclosing signal owner for renderer scopes
Renderer blocks (fragment renderers, value-position host descriptors) carry
their enclosing scope's signal instance recipe after stampSignalInstanceKey
copies the parent's identity for RENDERER_INVOCATION_SITE. scopeSignalOwner
was still creating a separate frozen owner with the same instanceKey, because
the renderer looked stamped (signalInstanceParent set) and skipped the
existing host-fragment borrow path.
The duplicate owner caused:
- Declarations and event-owner captures landing in a different cell store
than SSR, which keeps one owner per key
- Retiring that duplicate on renderer unmount, potentially disposing cells
the parent component still owns
Fix: pre-mark renderer scopes with false in SCOPE_SIGNAL_OWNERS during
stamping, then detect the borrowed identity in scopeSignalOwner by checking
that the scope's recipe fields match its enclosing scope's. When they match,
delegate to scopeSignalOwner(enclosing) instead of creating a new owner.
The false marker prevents retirement on unmount, matching the existing
host-control-fragment borrow pattern.1 parent 5ca824a commit b948375
1 file changed
Lines changed: 24 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
913 | 913 | | |
914 | 914 | | |
915 | 915 | | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
916 | 921 | | |
917 | 922 | | |
918 | 923 | | |
| |||
1017 | 1022 | | |
1018 | 1023 | | |
1019 | 1024 | | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
1020 | 1044 | | |
1021 | 1045 | | |
1022 | 1046 | | |
| |||
0 commit comments