Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Issue 2206483004: Sloppy eval declarations should not shadow lexical function declarations (Closed)

Created:
4 years, 4 months ago by adamk
Modified:
4 years, 4 months ago
Reviewers:
Dan Ehrenberg
CC:
v8-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Sloppy eval declarations should not shadow lexical function declarations This was being allowed due to the use of BindingFlags instead of VariableMode to determine whether a looked-up binding was lexical. Because function declarations are hoisted, they never need hole checks, and so were being miscategorized as non-lexical. This patch augments Context::Lookup with a VariableMode out param, which allows this check to determine precisely whether the binding is lexical. BUG=v8:4454, v8:5256 Committed: https://crrev.com/83b63c308a38a156bf376a7babbd89ba2573b426 Cr-Commit-Position: refs/heads/master@{#38260}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+43 lines, -18 lines) Patch
M src/contexts.h View 1 chunk +4 lines, -5 lines 0 comments Download
M src/contexts.cc View 7 chunks +11 lines, -7 lines 0 comments Download
M src/runtime/runtime-scopes.cc View 5 chunks +11 lines, -6 lines 0 comments Download
M test/mjsunit/es6/block-eval-var-over-let.js View 1 chunk +17 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 12 (7 generated)
adamk
4 years, 4 months ago (2016-08-02 19:31:13 UTC) #4
Dan Ehrenberg
lgtm Nice clean fix to this oversight of mine!
4 years, 4 months ago (2016-08-02 20:08:32 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2206483004/1
4 years, 4 months ago (2016-08-02 20:20:05 UTC) #9
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 4 months ago (2016-08-02 20:22:02 UTC) #10
commit-bot: I haz the power
4 years, 4 months ago (2016-08-02 20:27:51 UTC) #12
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/83b63c308a38a156bf376a7babbd89ba2573b426
Cr-Commit-Position: refs/heads/master@{#38260}

Powered by Google App Engine
This is Rietveld 408576698