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

Unified Diff: src/runtime/runtime-scopes.cc

Issue 1226103002: [es6] Handle conflicts for sloppy let (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: more comments and git rebase Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/preparser.h ('k') | test/mjsunit/es6/block-let-semantics.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-scopes.cc
diff --git a/src/runtime/runtime-scopes.cc b/src/runtime/runtime-scopes.cc
index 953a09f16df7127c2654207571fe61cb483f3c59..b4506512a188e92ee9a02e341582a7fbe1ce30f6 100644
--- a/src/runtime/runtime-scopes.cc
+++ b/src/runtime/runtime-scopes.cc
@@ -1026,6 +1026,12 @@ RUNTIME_FUNCTION(Runtime_StoreLookupSlot) {
// The property was found in a context slot.
if (index >= 0) {
+ if ((binding_flags == MUTABLE_CHECK_INITIALIZED ||
+ binding_flags == IMMUTABLE_CHECK_INITIALIZED_HARMONY) &&
+ Handle<Context>::cast(holder)->is_the_hole(index)) {
+ THROW_NEW_ERROR_RETURN_FAILURE(
+ isolate, NewReferenceError(MessageTemplate::kNotDefined, name));
+ }
if ((attributes & READ_ONLY) == 0) {
Handle<Context>::cast(holder)->set(index, *value);
} else if (is_strict(language_mode)) {
« no previous file with comments | « src/preparser.h ('k') | test/mjsunit/es6/block-let-semantics.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698