Commit a6a74d4
Defer backtracking assertion to end-of-frame for same-frame mutations
Instead of immediately allowing or throwing for same-frame get/set,
defer the assertion to endTrackingTransaction. If the tag is
re-consumed (get/set/get pattern) before the frame ends, the pending
assertion is cleared. Otherwise it still fires.
This preserves the safety net for get/set without re-get (which can
cause infinite revalidation) while allowing the lazy initialization
pattern (get/set/get).
Also fixes lint: remove unused backtrackingMessageFor import.
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>1 parent 24f5256 commit a6a74d4
5 files changed
Lines changed: 100 additions & 6 deletions
File tree
- packages
- @ember/-internals
- glimmer/tests/integration
- metal/tests/tracked
- @glimmer-workspace/integration-tests/test/managers
- @glimmer/validator
- lib
- test
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | 14 | | |
16 | 15 | | |
17 | 16 | | |
| |||
272 | 271 | | |
273 | 272 | | |
274 | 273 | | |
| 274 | + | |
275 | 275 | | |
276 | 276 | | |
277 | 277 | | |
| |||
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
380 | 380 | | |
381 | 381 | | |
382 | 382 | | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
383 | 401 | | |
384 | 402 | | |
385 | 403 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
| 231 | + | |
231 | 232 | | |
232 | 233 | | |
233 | 234 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
37 | 45 | | |
38 | 46 | | |
39 | 47 | | |
| |||
81 | 89 | | |
82 | 90 | | |
83 | 91 | | |
84 | | - | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
85 | 108 | | |
86 | 109 | | |
87 | 110 | | |
| 111 | + | |
88 | 112 | | |
89 | 113 | | |
90 | 114 | | |
| |||
97 | 121 | | |
98 | 122 | | |
99 | 123 | | |
| 124 | + | |
100 | 125 | | |
101 | 126 | | |
102 | 127 | | |
| |||
178 | 203 | | |
179 | 204 | | |
180 | 205 | | |
181 | | - | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
182 | 215 | | |
183 | 216 | | |
184 | 217 | | |
| |||
204 | 237 | | |
205 | 238 | | |
206 | 239 | | |
207 | | - | |
208 | | - | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
209 | 243 | | |
210 | 244 | | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
211 | 249 | | |
212 | 250 | | |
213 | 251 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
513 | 513 | | |
514 | 514 | | |
515 | 515 | | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
516 | 539 | | |
517 | 540 | | |
518 | 541 | | |
| |||
547 | 570 | | |
548 | 571 | | |
549 | 572 | | |
550 | | - | |
| 573 | + | |
551 | 574 | | |
552 | 575 | | |
553 | 576 | | |
| |||
558 | 581 | | |
559 | 582 | | |
560 | 583 | | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
561 | 598 | | |
562 | 599 | | |
563 | 600 | | |
| |||
0 commit comments