Commit e239045
deps: cherry-pick 2aa070be from V8 upstream
Original commit message:
InstanceOfStub incorrectly interprets the hole as a prototype.
Repair this to match what the runtime correctly does, by first
checking if the function is a constructor before we access the
prototype.
R=verwaest@chromium.org
BUG=
Committed: https://crrev.com/2aa070be4fd2960df98905b254f12ed801ef26cd
Cr-Commit-Position: refs/heads/master@{#34863}
This fixes the behavior of instanceof when the second parameter is not a
constructor.
Fixes: #7592
PR-URL: #7638
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>1 parent 71f84b5 commit e239045Copy full SHA for e239045
File tree
Expand file treeCollapse file tree
7 files changed
+30
-5
lines changedOpen diff view settings
Filter options
- deps/v8
- src
- arm64
- arm
- ia32
- mips64
- mips
- x64
- test/mjsunit/regress
Expand file treeCollapse file tree
7 files changed
+30
-5
lines changedOpen diff view settings
Collapse file
deps/v8/src/arm/code-stubs-arm.cc
Copy file name to clipboardExpand all lines: deps/v8/src/arm/code-stubs-arm.cc+5-1Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1358 | 1358 | |
1359 | 1359 | |
1360 | 1360 | |
1361 | | - |
| 1361 | + |
1362 | 1362 | |
| 1363 | + |
| 1364 | + |
| 1365 | + |
| 1366 | + |
1363 | 1367 | |
1364 | 1368 | |
1365 | 1369 | |
|
Collapse file
deps/v8/src/arm64/code-stubs-arm64.cc
Copy file name to clipboardExpand all lines: deps/v8/src/arm64/code-stubs-arm64.cc+4-1Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1544 | 1544 | |
1545 | 1545 | |
1546 | 1546 | |
1547 | | - |
| 1547 | + |
1548 | 1548 | |
| 1549 | + |
| 1550 | + |
| 1551 | + |
1549 | 1552 | |
1550 | 1553 | |
1551 | 1554 | |
|
Collapse file
deps/v8/src/ia32/code-stubs-ia32.cc
Copy file name to clipboardExpand all lines: deps/v8/src/ia32/code-stubs-ia32.cc+5Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
2110 | 2110 | |
2111 | 2111 | |
2112 | 2112 | |
| 2113 | + |
| 2114 | + |
| 2115 | + |
| 2116 | + |
| 2117 | + |
2113 | 2118 | |
2114 | 2119 | |
2115 | 2120 | |
|
Collapse file
deps/v8/src/mips/code-stubs-mips.cc
Copy file name to clipboardExpand all lines: deps/v8/src/mips/code-stubs-mips.cc+5-1Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1492 | 1492 | |
1493 | 1493 | |
1494 | 1494 | |
1495 | | - |
| 1495 | + |
1496 | 1496 | |
| 1497 | + |
| 1498 | + |
| 1499 | + |
| 1500 | + |
1497 | 1501 | |
1498 | 1502 | |
1499 | 1503 | |
|
Collapse file
deps/v8/src/mips64/code-stubs-mips64.cc
Copy file name to clipboardExpand all lines: deps/v8/src/mips64/code-stubs-mips64.cc+5-1Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1488 | 1488 | |
1489 | 1489 | |
1490 | 1490 | |
1491 | | - |
| 1491 | + |
1492 | 1492 | |
| 1493 | + |
| 1494 | + |
| 1495 | + |
| 1496 | + |
1493 | 1497 | |
1494 | 1498 | |
1495 | 1499 | |
|
Collapse file
deps/v8/src/x64/code-stubs-x64.cc
Copy file name to clipboardExpand all lines: deps/v8/src/x64/code-stubs-x64.cc+5Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
2069 | 2069 | |
2070 | 2070 | |
2071 | 2071 | |
| 2072 | + |
| 2073 | + |
| 2074 | + |
| 2075 | + |
| 2076 | + |
2072 | 2077 | |
2073 | 2078 | |
2074 | 2079 | |
|
Collapse file
deps/v8/test/mjsunit/regress/regress-crbug-573858.js
Copy file name to clipboardExpand all lines: deps/v8/test/mjsunit/regress/regress-crbug-573858.js+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
9 | 9 | |
10 | 10 | |
11 | 11 | |
12 | | - |
| 12 | + |
13 | 13 | |
14 | 14 | |
15 | 15 | |
|
0 commit comments