Skip to content

Commit 6fe9ded

Browse files
committed
fix: use Symbol.for for CHILDREN_SIGNAL_OWNER so it survives cross-copy runtimes
CHILDREN_BLOCK and CHILDREN_BODY already use Symbol.for so a children function created by one Octane copy is recognized by another (e.g. a binding bundled against its own runtime). CHILDREN_SIGNAL_OWNER must use the same strategy, otherwise scopeSignalOwner cannot read the recorded author owner across copies and the children's owner is created without an enclosingOwner.
1 parent 40a7404 commit 6fe9ded

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎packages/octane/src/runtime.server.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ const TEMPLATE_INVOCATION_SITE = 't:';
513513
// Compiled children are part of the template that authored them, not of the
514514
// component rendering them. markChildrenBlock records the owner that template
515515
// renders in, and the children's owner links to it (runtime.ts does the same).
516-
const CHILDREN_SIGNAL_OWNER: unique symbol = Symbol() as any;
516+
const CHILDREN_SIGNAL_OWNER: unique symbol = Symbol.for('octane.childrenSignalOwner') as any;
517517
let SIGNAL_COMPONENT_INSTANCE_KEY: ServerSignalInstanceKey = '';
518518
let SERVER_SIGNAL_OWNER_ACTIVE = false;
519519
let SIGNAL_CONTROL_SITE = '';

‎packages/octane/src/runtime.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14839,7 +14839,7 @@ const CHILDREN_CAPTURES: unique symbol = Symbol.for('octane.childrenCaptures') a
1483914839
// their parent are. markChildrenBlock records the signal owner that template
1484014840
// renders in, and scopeSignalOwner links the children's owner to it. A render
1484114841
// runs in an owner identity, which never retains its renderer tree.
14842-
const CHILDREN_SIGNAL_OWNER: unique symbol = Symbol() as any;
14842+
const CHILDREN_SIGNAL_OWNER: unique symbol = Symbol.for('octane.childrenSignalOwner') as any;
1484314843

1484414844
/**
1484514845
* Compiler-emitted: attach markerless single-host-root metadata while a fresh

0 commit comments

Comments
 (0)