Repository navigation
Commit 2ea0aef
committed
fix(compiler): fail closed on callback-accepting namespace method arguments
Array.from, JSON.parse, JSON.stringify, and Object.groupBy synchronously invoke
a callback argument. When that callback was passed by reference rather than
inline, setupCanScheduleSelfUpdate skipped it (an Identifier is not a call), so
the setup checkpoint was omitted even though the callback could call a setter.
Add SETUP_CALLBACK_NAMESPACE_METHODS to identify these methods. For them, the
data argument (index 0) is walked normally; subsequent arguments use
walkInvokedArgument, the same fail-closed check that sync-factory hooks already
use. Inline arrow callbacks are still entered and classified; only opaque
references now correctly trigger the checkpoint.1 parent 81f7a79 commit 2ea0aef
2 files changed
Lines changed: 44 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4773 | 4773 | | |
4774 | 4774 | | |
4775 | 4775 | | |
| 4776 | + | |
| 4777 | + | |
| 4778 | + | |
| 4779 | + | |
| 4780 | + | |
| 4781 | + | |
| 4782 | + | |
| 4783 | + | |
| 4784 | + | |
| 4785 | + | |
| 4786 | + | |
4776 | 4787 | | |
4777 | 4788 | | |
4778 | 4789 | | |
| |||
4876 | 4887 | | |
4877 | 4888 | | |
4878 | 4889 | | |
4879 | | - | |
| 4890 | + | |
| 4891 | + | |
| 4892 | + | |
| 4893 | + | |
| 4894 | + | |
| 4895 | + | |
| 4896 | + | |
| 4897 | + | |
| 4898 | + | |
4880 | 4899 | | |
4881 | 4900 | | |
4882 | 4901 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
581 | 581 | | |
582 | 582 | | |
583 | 583 | | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
584 | 592 | | |
585 | 593 | | |
586 | 594 | | |
| |||
605 | 613 | | |
606 | 614 | | |
607 | 615 | | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
608 | 632 | | |
609 | 633 | | |
610 | 634 | | |
| |||
0 commit comments