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

Issue 1437003006: Fix harmony sloppy block scoping dynamic redeclaration check (Closed)

Created:
5 years, 1 month ago by adamk
Modified:
5 years, 1 month 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

Fix harmony sloppy block scoping dynamic redeclaration check The previous code did not properly check for harmony const when doing the dynamic redeclaration check. This was masked in the test because each eval had an initializer, and the initializer was what triggered the exception. This patch tightens the test by removing initializers and fixes the bug in DeclareLookupSlot. Also change the test to use assertThrows where possible. BUG=v8:4550 LOG=n Committed: https://crrev.com/fd3ff03da22304344bd95dc65ac76ed354f87da2 Cr-Commit-Position: refs/heads/master@{#31995}

Patch Set 1 #

Patch Set 2 : Tighten test, fix bug in redeclaration check #

Total comments: 7
Unified diffs Side-by-side diffs Delta from patch set Stats (+67 lines, -139 lines) Patch
M src/runtime/runtime-scopes.cc View 1 1 chunk +2 lines, -1 line 2 comments Download
M test/mjsunit/harmony/block-eval-var-over-legacy-const.js View 1 chunk +21 lines, -46 lines 0 comments Download
M test/mjsunit/harmony/block-eval-var-over-let.js View 1 3 chunks +44 lines, -92 lines 5 comments Download

Messages

Total messages: 17 (4 generated)
adamk
Just noticed this when I broke these tests in an in-progress patch, this refactoring makes ...
5 years, 1 month ago (2015-11-12 22:35:38 UTC) #2
adamk
Hmm, I think there's actually a bug in the related code, fix coming up and ...
5 years, 1 month ago (2015-11-12 22:58:20 UTC) #3
adamk
Okay, this patch now fixes a bug besides changing the test :)
5 years, 1 month ago (2015-11-12 23:08:38 UTC) #6
adamk
https://codereview.chromium.org/1437003006/diff/20001/src/runtime/runtime-scopes.cc File src/runtime/runtime-scopes.cc (right): https://codereview.chromium.org/1437003006/diff/20001/src/runtime/runtime-scopes.cc#newcode234 src/runtime/runtime-scopes.cc:234: binding_flags == IMMUTABLE_CHECK_INITIALIZED || This is for CONST_LEGACY, I ...
5 years, 1 month ago (2015-11-12 23:22:27 UTC) #7
Dan Ehrenberg
https://codereview.chromium.org/1437003006/diff/20001/test/mjsunit/harmony/block-eval-var-over-let.js File test/mjsunit/harmony/block-eval-var-over-let.js (right): https://codereview.chromium.org/1437003006/diff/20001/test/mjsunit/harmony/block-eval-var-over-let.js#newcode12 test/mjsunit/harmony/block-eval-var-over-let.js:12: eval('var x'); How about leaving in the previous tests ...
5 years, 1 month ago (2015-11-12 23:41:57 UTC) #8
Dan Ehrenberg
lgtm LGTM modulo re-adding the changed tests.
5 years, 1 month ago (2015-11-12 23:42:23 UTC) #9
adamk
https://codereview.chromium.org/1437003006/diff/20001/test/mjsunit/harmony/block-eval-var-over-let.js File test/mjsunit/harmony/block-eval-var-over-let.js (right): https://codereview.chromium.org/1437003006/diff/20001/test/mjsunit/harmony/block-eval-var-over-let.js#newcode12 test/mjsunit/harmony/block-eval-var-over-let.js:12: eval('var x'); On 2015/11/12 23:41:57, Dan Ehrenberg wrote: > ...
5 years, 1 month ago (2015-11-12 23:45:17 UTC) #10
Dan Ehrenberg
https://codereview.chromium.org/1437003006/diff/20001/test/mjsunit/harmony/block-eval-var-over-let.js File test/mjsunit/harmony/block-eval-var-over-let.js (right): https://codereview.chromium.org/1437003006/diff/20001/test/mjsunit/harmony/block-eval-var-over-let.js#newcode12 test/mjsunit/harmony/block-eval-var-over-let.js:12: eval('var x'); On 2015/11/12 at 23:45:17, adamk wrote: > ...
5 years, 1 month ago (2015-11-12 23:53:19 UTC) #11
adamk
https://codereview.chromium.org/1437003006/diff/20001/src/runtime/runtime-scopes.cc File src/runtime/runtime-scopes.cc (right): https://codereview.chromium.org/1437003006/diff/20001/src/runtime/runtime-scopes.cc#newcode234 src/runtime/runtime-scopes.cc:234: binding_flags == IMMUTABLE_CHECK_INITIALIZED || On 2015/11/12 23:22:27, adamk wrote: ...
5 years, 1 month ago (2015-11-13 07:06:01 UTC) #12
adamk
https://codereview.chromium.org/1437003006/diff/20001/test/mjsunit/harmony/block-eval-var-over-let.js File test/mjsunit/harmony/block-eval-var-over-let.js (right): https://codereview.chromium.org/1437003006/diff/20001/test/mjsunit/harmony/block-eval-var-over-let.js#newcode12 test/mjsunit/harmony/block-eval-var-over-let.js:12: eval('var x'); On 2015/11/13 07:06:01, adamk wrote: > On ...
5 years, 1 month ago (2015-11-13 20:59:07 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1437003006/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1437003006/20001
5 years, 1 month ago (2015-11-13 21:02:20 UTC) #15
commit-bot: I haz the power
Committed patchset #2 (id:20001)
5 years, 1 month ago (2015-11-13 21:03:49 UTC) #16
commit-bot: I haz the power
5 years, 1 month ago (2015-11-14 23:22:00 UTC) #17
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/fd3ff03da22304344bd95dc65ac76ed354f87da2
Cr-Commit-Position: refs/heads/master@{#31995}

Powered by Google App Engine
This is Rietveld 408576698