Commit 798fcbb
deps: V8: cherry-pick c795f5948568
Original commit message:
[immutable-array-buffer] Fix check order in TypedArray.prototype.set
According to the spec, TypedArray.prototype.set checks
IsImmutableBuffer(target.[[ViewedArrayBuffer]]) before converting
the offset argument to integer and before reading from the source
object.
Additionally, when setting from a TypedArray source, reading from an
immutable source TypedArray is permitted, so the source array should
be validated using TypedArrayAccessMode::kRead rather than kWrite.
Drive-By: Add a fast case for Smi indices where the steps are not
observable and we can fold all checks.
TAG=agy
CONV=94aa3be8-9990-41fe-a565-c62e3daa9a42
Bug: 450237486
Change-Id: I21790be90cde9a96ba7c1f573f034016d9c29850
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/8252528
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Auto-Submit: Olivier Flückiger <olivf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#109366}
Refs: v8/v8@c795f591 parent c570b67 commit 798fcbb
3 files changed
Lines changed: 97 additions & 24 deletions
File tree
- deps/v8
- include
- src/builtins
- test/mjsunit
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
50 | | - | |
51 | | - | |
| 49 | + | |
52 | 50 | | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
64 | 101 | | |
65 | | - | |
66 | | - | |
67 | 102 | | |
68 | 103 | | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | 104 | | |
76 | 105 | | |
77 | 106 | | |
| |||
86 | 115 | | |
87 | 116 | | |
88 | 117 | | |
89 | | - | |
| 118 | + | |
90 | 119 | | |
91 | 120 | | |
92 | 121 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
564 | 564 | | |
565 | 565 | | |
566 | 566 | | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
0 commit comments