Repository navigation
Commit f77082c
authored
fix(patches): own-property lookups through a non-masking interceptor (#11)
If a receiver has a kNonMasking named interceptor and an object on its
prototype chain has a named interceptor of its own, an own-property
lookup on the receiver ended on that prototype instead of NOT_FOUND.
LookupIterator::NextInternal meant to treat the prototype's interceptor
as invisible, but it `continue`d inside `do { } while (!IsFound())`
while the state was still INTERCEPTOR, so the walk stopped there.
Prototype properties then read as own, `delete obj.m` removed `m` from
the prototype, and sets and defineProperty reached the prototype's
interceptor instead of the receiver's.
v8_nonmasking_own_lookup.patch steps past the invisible interceptor (or
a passed access check) within the same holder, so its real properties
still count, and only moves on when nothing is found there. Indexed
interceptors are no longer skipped, matching upstream since
892dda71342. Reported upstream as crbug 585053531; applied on every
platform.
The iOS runtime's wrapper canary mode puts kNonMasking interceptors on
ObjC instances, whose prototypes already carry a named interceptor.1 parent c43d232 commit f77082c
3 files changed
Lines changed: 42 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| 131 | + | |
131 | 132 | | |
132 | 133 | | |
133 | 134 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
90 | 94 | | |
91 | 95 | | |
92 | 96 | | |
| |||
0 commit comments