Commit 096c956
committed
Add new check for a special corner case to typedarray lastIndexOf
Fixes #3129
We need to check if we use the lastIndexOf method and if the second
argument is a number, negative, and its absolute value is bigger
than the length, then we should return with -1.
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu1 parent 25b81c1 commit 096c956
File tree
2 files changed
+30
-7
lines changed- jerry-core/ecma/builtin-objects/typedarray
- tests/jerry/es2015
2 files changed
+30
-7
lines changedLines changed: 13 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1719 | 1719 | | |
1720 | 1720 | | |
1721 | 1721 | | |
1722 | | - | |
| 1722 | + | |
| 1723 | + | |
1723 | 1724 | | |
1724 | 1725 | | |
1725 | 1726 | | |
| |||
1736 | 1737 | | |
1737 | 1738 | | |
1738 | 1739 | | |
1739 | | - | |
1740 | | - | |
1741 | | - | |
1742 | | - | |
1743 | | - | |
1744 | | - | |
| 1740 | + | |
| 1741 | + | |
| 1742 | + | |
| 1743 | + | |
| 1744 | + | |
| 1745 | + | |
| 1746 | + | |
| 1747 | + | |
| 1748 | + | |
| 1749 | + | |
| 1750 | + | |
1745 | 1751 | | |
1746 | 1752 | | |
1747 | 1753 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
0 commit comments