Commit 03c4948
fix(gxt): swap globalThis.owner per outlet render so engine refinements don't bleed into application
The shared `<ember-outlet>` element calls `tpl.render(nestedContext, this)`
without first swapping `globalThis.owner`. When the nested outlet's owner is
an engine instance (different from the application owner), curly bare
identifiers like `{{ambiguous-curlies}}` resolve via `$_maybeHelper`, which
reads `globalThis.owner` to call `factoryFor('component:...')` — picking up
the application's registry instead of the engine's. A template registered in
BOTH the application and the engine therefore resolved engine-scoped
component refinements against the application owner, leaking application
state into the engine's render output.
Save the previous `globalThis.owner`, swap to the nested outlet's render
owner for the duration of `tpl.render`, and restore it in the finally block.
This matches the analogous swap already present in `gxt-backend/outlet.gts`'s
EmberOutletElement implementation.
Fixes the two failing 'has separate refinements' tests in
`Application test: engine rendering` (20/20 pass; smoke 333/333).
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>1 parent 1c51bd4 commit 03c4948
1 file changed
Lines changed: 17 additions & 0 deletions
Lines changed: 17 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
250 | 250 | | |
251 | 251 | | |
252 | 252 | | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
253 | 267 | | |
254 | 268 | | |
255 | 269 | | |
| |||
262 | 276 | | |
263 | 277 | | |
264 | 278 | | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
265 | 282 | | |
266 | 283 | | |
267 | 284 | | |
| |||
0 commit comments