Commit 9dce433
committed
Fix property write semantics: handle non-extensible and non-writable cases
- Enforce non-extensible objects: prevent adding new own properties (throw TypeError) (`src/core/value.rs`)
- Ensure assignment respects non-writable properties and throws TypeError when appropriate (`src/core/eval.rs`)
- Honor "writable" in Object.defineProperty (mark properties non-writable) (`src/js_object.rs`)
- Remove temporary debug logs from `js-scripts/object_tests_01.js`1 parent 3de9362 commit 9dce433
File tree
5 files changed
+47
-2
lines changed- .github/workflows
- js-scripts
- src
- core
5 files changed
+47
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
59 | 74 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6091 | 6091 | | |
6092 | 6092 | | |
6093 | 6093 | | |
| 6094 | + | |
| 6095 | + | |
| 6096 | + | |
| 6097 | + | |
6094 | 6098 | | |
6095 | 6099 | | |
6096 | 6100 | | |
| |||
6099 | 6103 | | |
6100 | 6104 | | |
6101 | 6105 | | |
| 6106 | + | |
| 6107 | + | |
| 6108 | + | |
| 6109 | + | |
6102 | 6110 | | |
6103 | 6111 | | |
6104 | 6112 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
812 | 812 | | |
813 | 813 | | |
814 | 814 | | |
815 | | - | |
| 815 | + | |
816 | 816 | | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
817 | 831 | | |
818 | 832 | | |
819 | 833 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
183 | 191 | | |
184 | 192 | | |
185 | 193 | | |
| |||
0 commit comments