Commit d90d453
Fix reading integer-indexed import assertions in dynamic import
Use GetPropertyOrElement instead of GetProperty to read import assertion
values from the import assertions object, to support cases in which the
key is an integer index such as `"0"`.
The added test case, when using GetProperty, triggers the following DCHECK in
debug builds:
https://source.chromium.org/chromium/chromium/src/+/main:v8/src/objects/lookup-inl.h;l=108;drc=515f187ba067ee4a99fdf5198cca2c97abd342fd
In release builds it silently fails to read the property, and thus throws about
it not being a valid string.
Bug: v8:14069
Change-Id: Ifd4645b7bd9bfd07f06fa33727441d27eabc4d32
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4614489
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#88267}1 parent 1821a0c commit d90d453
2 files changed
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5246 | 5246 | | |
5247 | 5247 | | |
5248 | 5248 | | |
5249 | | - | |
5250 | | - | |
| 5249 | + | |
| 5250 | + | |
5251 | 5251 | | |
5252 | 5252 | | |
5253 | 5253 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
11 | 15 | | |
12 | 16 | | |
13 | 17 | | |
| 18 | + | |
0 commit comments