Commit cd78a2b
deps: backport 75f2d65f00 from upstream V8
Original commit message:
Don't treat catch scopes as possibly-shadowing for sloppy eval
Scope analysis is over-conservative when treating variable
resolutions as possibly-shadowed by a sloppy eval. In the attached
bug, this comes into play since catch scopes have different behavior
with respect to the "calls eval" in eager vs lazy compilation (in
the latter, they are never marked as "calls eval" because
CatchContexts don't have an associated ScopeInfo).
This patch changes the scope-type check to also eliminate a few
other cases where shadowing isn't possible, such as non-declaration
block scopes.
BUG=chromium:608279
LOG=n
Committed:
https://crrev.com/75f2d65f003ebb22815489e9970913ba37234f1b
Cr-Commit-Position: refs/heads/master@{#36046}
Fixes: #12308
PR-URL: #12535
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Myles Borins <myles.borins@gmail.com>1 parent e7e83f6 commit cd78a2bCopy full SHA for cd78a2b
File tree
Expand file treeCollapse file tree
3 files changed
+24
-3
lines changedOpen diff view settings
Filter options
- deps/v8
- include
- src/ast
- test/mjsunit/regress
Expand file treeCollapse file tree
3 files changed
+24
-3
lines changedOpen diff view settings
Collapse file
deps/v8/include/v8-version.h
Copy file name to clipboardExpand all lines: deps/v8/include/v8-version.h+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
11 | 11 | |
12 | 12 | |
13 | 13 | |
14 | | - |
| 14 | + |
15 | 15 | |
16 | 16 | |
17 | 17 | |
|
Collapse file
+5-2Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1083 | 1083 | |
1084 | 1084 | |
1085 | 1085 | |
1086 | | - |
1087 | | - |
| 1086 | + |
| 1087 | + |
1088 | 1088 | |
1089 | 1089 | |
1090 | 1090 | |
1091 | 1091 | |
| 1092 | + |
| 1093 | + |
| 1094 | + |
1092 | 1095 | |
1093 | 1096 | |
1094 | 1097 | |
|
Collapse file
deps/v8/test/mjsunit/regress/regress-crbug-608279.js
Copy file name to clipboard+18Lines changed: 18 additions & 0 deletions
| 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 | + |
| 18 | + |
0 commit comments