Commit 784431d
deps: V8: backport 088b7112e7ab
Original commit message:
[runtime] Fix contextual stores to global with interceptor
According to the spec, contextual store in strict mode must first
check whether property exists and if not, the ReferenceError
should be thrown instead of calling the interceptor setter. See
https://tc39.es/ecma262/#sec-object-environment-records-setmutablebinding-n-v-s
Drive-by:
- introduce new Api v8::Object::GetPropertyAttributes(..) which is
able to return "property does not exist" result, which wasn't
possible with the existing GetPropertyAttributes(..) Api,
- update GenericInterceptor* callbacks in test-api-interceptors.cc
to better suite for implementing a proxy-like interceptor.
Bug: 455600234
Change-Id: I0986c18c406844f58c453e7aa7513c52a9097e04
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7718821
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#106322}
Refs: v8/v8@088b711
Co-authored-by: Michaël Zasso <targos@protonmail.com>
PR-URL: #61898
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
(cherry picked from commit 4dafa68)1 parent 3839c4a commit 784431dCopy full SHA for 784431d
6 files changed
+237-10Lines changed: 237 additions & 10 deletions
File tree
Expand file treeCollapse file tree
Open diff view settings
Filter options
- deps/v8
- include
- src
- api
- ic
- objects
- test/cctest
Expand file treeCollapse file tree
Open diff view settings
Collapse file
+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
38 | 38 | |
39 | 39 | |
40 | 40 | |
41 | | - |
| 41 | + |
42 | 42 | |
43 | 43 | |
44 | 44 | |
|
Collapse file
deps/v8/include/v8-object.h
Copy file name to clipboardExpand all lines: deps/v8/include/v8-object.h+15Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
336 | 336 | |
337 | 337 | |
338 | 338 | |
| 339 | + |
| 340 | + |
| 341 | + |
| 342 | + |
339 | 343 | |
340 | 344 | |
341 | 345 | |
| 346 | + |
| 347 | + |
| 348 | + |
| 349 | + |
| 350 | + |
| 351 | + |
| 352 | + |
| 353 | + |
| 354 | + |
| 355 | + |
| 356 | + |
342 | 357 | |
343 | 358 | |
344 | 359 | |
|
Collapse file
+13-2Lines changed: 13 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
4752 | 4752 | |
4753 | 4753 | |
4754 | 4754 | |
| 4755 | + |
| 4756 | + |
| 4757 | + |
| 4758 | + |
| 4759 | + |
| 4760 | + |
| 4761 | + |
| 4762 | + |
| 4763 | + |
| 4764 | + |
4755 | 4765 | |
4756 | 4766 | |
4757 | 4767 | |
| ||
4764 | 4774 | |
4765 | 4775 | |
4766 | 4776 | |
4767 | | - |
| 4777 | + |
4768 | 4778 | |
4769 | | - |
| 4779 | + |
| 4780 | + |
4770 | 4781 | |
4771 | 4782 | |
4772 | 4783 | |
|
Collapse file
+18Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1813 | 1813 | |
1814 | 1814 | |
1815 | 1815 | |
| 1816 | + |
| 1817 | + |
1816 | 1818 | |
1817 | 1819 | |
1818 | 1820 | |
| ||
2084 | 2086 | |
2085 | 2087 | |
2086 | 2088 | |
| 2089 | + |
| 2090 | + |
2087 | 2091 | |
2088 | 2092 | |
2089 | 2093 | |
| ||
2166 | 2170 | |
2167 | 2171 | |
2168 | 2172 | |
| 2173 | + |
| 2174 | + |
| 2175 | + |
| 2176 | + |
| 2177 | + |
| 2178 | + |
| 2179 | + |
| 2180 | + |
| 2181 | + |
| 2182 | + |
| 2183 | + |
| 2184 | + |
| 2185 | + |
| 2186 | + |
2169 | 2187 | |
2170 | 2188 | |
2171 | 2189 | |
|
Collapse file
deps/v8/src/objects/objects.cc
Copy file name to clipboardExpand all lines: deps/v8/src/objects/objects.cc+22Lines changed: 22 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
2382 | 2382 | |
2383 | 2383 | |
2384 | 2384 | |
| 2385 | + |
| 2386 | + |
| 2387 | + |
| 2388 | + |
| 2389 | + |
| 2390 | + |
| 2391 | + |
| 2392 | + |
| 2393 | + |
| 2394 | + |
| 2395 | + |
| 2396 | + |
| 2397 | + |
| 2398 | + |
| 2399 | + |
| 2400 | + |
| 2401 | + |
| 2402 | + |
| 2403 | + |
| 2404 | + |
| 2405 | + |
| 2406 | + |
2385 | 2407 | |
2386 | 2408 | |
2387 | 2409 | |
|
Collapse file
deps/v8/test/cctest/test-api-interceptors.cc
Copy file name to clipboardExpand all lines: deps/v8/test/cctest/test-api-interceptors.cc+168-7Lines changed: 168 additions & 7 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
199 | 199 | |
200 | 200 | |
201 | 201 | |
202 | | - |
| 202 | + |
203 | 203 | |
204 | 204 | |
205 | 205 | |
| ||
209 | 209 | |
210 | 210 | |
211 | 211 | |
| 212 | + |
| 213 | + |
| 214 | + |
| 215 | + |
| 216 | + |
| 217 | + |
| 218 | + |
| 219 | + |
| 220 | + |
| 221 | + |
| 222 | + |
| 223 | + |
| 224 | + |
| 225 | + |
| 226 | + |
| 227 | + |
| 228 | + |
| 229 | + |
| 230 | + |
| 231 | + |
| 232 | + |
| 233 | + |
| 234 | + |
| 235 | + |
| 236 | + |
| 237 | + |
| 238 | + |
| 239 | + |
| 240 | + |
212 | 241 | |
213 | 242 | |
214 | 243 | |
| ||
222 | 251 | |
223 | 252 | |
224 | 253 | |
225 | | - |
| 254 | + |
226 | 255 | |
227 | 256 | |
228 | 257 | |
| ||
1632 | 1661 | |
1633 | 1662 | |
1634 | 1663 | |
1635 | | - |
| 1664 | + |
1636 | 1665 | |
1637 | | - |
| 1666 | + |
1638 | 1667 | |
1639 | 1668 | |
1640 | 1669 | |
| ||
2061 | 2090 | |
2062 | 2091 | |
2063 | 2092 | |
| 2093 | + |
| 2094 | + |
| 2095 | + |
| 2096 | + |
| 2097 | + |
| 2098 | + |
| 2099 | + |
| 2100 | + |
| 2101 | + |
| 2102 | + |
| 2103 | + |
| 2104 | + |
| 2105 | + |
| 2106 | + |
| 2107 | + |
| 2108 | + |
| 2109 | + |
| 2110 | + |
| 2111 | + |
| 2112 | + |
| 2113 | + |
| 2114 | + |
| 2115 | + |
| 2116 | + |
| 2117 | + |
| 2118 | + |
| 2119 | + |
| 2120 | + |
| 2121 | + |
| 2122 | + |
| 2123 | + |
| 2124 | + |
| 2125 | + |
| 2126 | + |
| 2127 | + |
| 2128 | + |
| 2129 | + |
| 2130 | + |
| 2131 | + |
| 2132 | + |
| 2133 | + |
| 2134 | + |
| 2135 | + |
| 2136 | + |
| 2137 | + |
| 2138 | + |
| 2139 | + |
| 2140 | + |
| 2141 | + |
| 2142 | + |
| 2143 | + |
| 2144 | + |
| 2145 | + |
| 2146 | + |
| 2147 | + |
| 2148 | + |
| 2149 | + |
| 2150 | + |
| 2151 | + |
| 2152 | + |
| 2153 | + |
| 2154 | + |
| 2155 | + |
| 2156 | + |
| 2157 | + |
| 2158 | + |
| 2159 | + |
| 2160 | + |
| 2161 | + |
| 2162 | + |
| 2163 | + |
| 2164 | + |
| 2165 | + |
| 2166 | + |
| 2167 | + |
| 2168 | + |
| 2169 | + |
| 2170 | + |
| 2171 | + |
| 2172 | + |
| 2173 | + |
| 2174 | + |
| 2175 | + |
| 2176 | + |
| 2177 | + |
| 2178 | + |
| 2179 | + |
| 2180 | + |
| 2181 | + |
| 2182 | + |
| 2183 | + |
| 2184 | + |
| 2185 | + |
| 2186 | + |
| 2187 | + |
| 2188 | + |
| 2189 | + |
| 2190 | + |
| 2191 | + |
| 2192 | + |
| 2193 | + |
| 2194 | + |
| 2195 | + |
| 2196 | + |
| 2197 | + |
| 2198 | + |
| 2199 | + |
| 2200 | + |
| 2201 | + |
| 2202 | + |
| 2203 | + |
| 2204 | + |
| 2205 | + |
| 2206 | + |
| 2207 | + |
| 2208 | + |
| 2209 | + |
| 2210 | + |
| 2211 | + |
| 2212 | + |
| 2213 | + |
| 2214 | + |
| 2215 | + |
| 2216 | + |
| 2217 | + |
| 2218 | + |
| 2219 | + |
| 2220 | + |
| 2221 | + |
| 2222 | + |
| 2223 | + |
| 2224 | + |
2064 | 2225 | |
2065 | 2226 | |
2066 | 2227 | |
| ||
2113 | 2274 | |
2114 | 2275 | |
2115 | 2276 | |
2116 | | - |
2117 | | - |
2118 | | - |
| 2277 | + |
| 2278 | + |
| 2279 | + |
2119 | 2280 | |
2120 | 2281 | |
2121 | 2282 | |
|
0 commit comments