Commit f33c347
fix(runtime): #5588 strict Set check on proxy-source symbol keys
Address CodeRabbit review: the proxy-source path wrote symbol keys via
`js_object_set_symbol_property` directly, skipping the strict-`Set`
rejection (read-only symbol data prop, setter-less accessor, or new
symbol on a non-extensible target) the ordinary source path applies. A
Proxy source's enumerable symbol key could thus bypass the required
TypeError on a frozen/read-only target.
Extract that block into `object_assign_throw_if_symbol_set_rejected` and
call it from both the proxy and ordinary symbol-write paths. Extend the
gap test with symbol-key copying, the frozen-target rejection, and an
explicit ownKeys→getOwnPropertyDescriptor→get trap-order assertion — all
byte-for-byte vs `node --experimental-strip-types`.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent e48e96f commit f33c347
2 files changed
Lines changed: 57 additions & 24 deletions
File tree
- crates/perry-runtime/src/object
- test-files
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
938 | 938 | | |
939 | 939 | | |
940 | 940 | | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
941 | 969 | | |
942 | 970 | | |
943 | 971 | | |
| |||
1041 | 1069 | | |
1042 | 1070 | | |
1043 | 1071 | | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
1044 | 1075 | | |
1045 | 1076 | | |
1046 | 1077 | | |
| |||
1266 | 1297 | | |
1267 | 1298 | | |
1268 | 1299 | | |
1269 | | - | |
1270 | | - | |
1271 | | - | |
1272 | | - | |
1273 | | - | |
1274 | | - | |
1275 | | - | |
1276 | | - | |
1277 | | - | |
1278 | | - | |
1279 | | - | |
1280 | | - | |
1281 | | - | |
1282 | | - | |
1283 | | - | |
1284 | | - | |
1285 | | - | |
1286 | | - | |
1287 | | - | |
1288 | | - | |
1289 | | - | |
1290 | | - | |
1291 | | - | |
1292 | | - | |
| 1300 | + | |
1293 | 1301 | | |
1294 | 1302 | | |
1295 | 1303 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
0 commit comments