Repository navigation
Commit 1bd19ba
committed
fix: guard ownMethodDep toString against throwing callables
Wrap Function.prototype.toString.call(method) and the subsequent regex
test in a try/catch inside ownMethodDep, returning the receiver on
failure. This matches the documented fail-closed contract: unrecognized
functions track the receiver (worst case is a spurious recompute).
The guarded path already caught reflection errors via its outer
try/catch, but the unguarded own-property path at line 77 called
ownMethodDep without protection. A callable whose toString throws
(revoked function proxy, SES/lockdown, some host/CSP wrappers) would
abort dependency evaluation during render instead of falling back.1 parent 527c9a4 commit 1bd19ba
1 file changed
Lines changed: 8 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
97 | 101 | | |
0 commit comments