File tree Expand file tree Collapse file tree
packages/@ember/-internals/glimmer/lib Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -232,7 +232,16 @@ class ClassicRootState {
232232
233233 let result = ( this . result = iterator . sync ( ) ) ;
234234
235- associateDestroyableChild ( owner , result ) ;
235+ // Associate the result with the root state (not the owner) so that
236+ // destruction cascades through:
237+ // Owner → Container → Renderer → RendererState → ClassicRootState → result
238+ // This ensures the container is still alive when component destructors
239+ // run (e.g. willDestroy looking up the renderer via injection).
240+ // Previously, associating with the owner made the result a sibling of
241+ // the Container, causing the Container to be destroyed first — which
242+ // broke FastBoot where the container was already dead by the time
243+ // component teardown tried to do lookups. (See: emberjs/ember.js#20984)
244+ associateDestroyableChild ( this , result ) ;
236245
237246 this . render = errorLoopTransaction ( ( ) => {
238247 if ( isDestroying ( result ) || isDestroyed ( result ) ) return ;
You can’t perform that action at this time.
0 commit comments