Index: src/contexts.cc |
diff --git a/src/contexts.cc b/src/contexts.cc |
index c0e724253f2767ed2a6bbbee436db3c99cd9f62a..496d845d585c43605a62d6e27a4c18689b9ad0dd 100644 |
--- a/src/contexts.cc |
+++ b/src/contexts.cc |
@@ -87,7 +87,8 @@ void Context::set_global_proxy(JSObject* object) { |
Handle<Object> Context::Lookup(Handle<String> name, |
ContextLookupFlags flags, |
int* index_, |
- PropertyAttributes* attributes) { |
+ PropertyAttributes* attributes, |
+ BindingFlags* binding_flags) { |
Isolate* isolate = GetIsolate(); |
Handle<Context> context(this, isolate); |
@@ -118,6 +119,7 @@ Handle<Object> Context::Lookup(Handle<String> name, |
} |
*index_ = Context::THROWN_OBJECT_INDEX; |
*attributes = NONE; |
+ *binding_flags = MUTABLE_IS_INITIALIZED; |
return context; |
} |
} else { |
@@ -180,11 +182,16 @@ Handle<Object> Context::Lookup(Handle<String> name, |
switch (mode) { |
case Variable::INTERNAL: // Fall through. |
case Variable::VAR: |
+ *attributes = NONE; |
+ *binding_flags = MUTABLE_IS_INITIALIZED; |
+ break; |
case Variable::LET: |
*attributes = NONE; |
+ *binding_flags = MUTABLE_CHECK_INITIALIZED; |
break; |
case Variable::CONST: |
*attributes = READ_ONLY; |
+ *binding_flags = IMMUTABLE_CHECK_INITIALIZED; |
break; |
case Variable::DYNAMIC: |
case Variable::DYNAMIC_GLOBAL: |
@@ -207,6 +214,7 @@ Handle<Object> Context::Lookup(Handle<String> name, |
} |
*index_ = index; |
*attributes = READ_ONLY; |
+ *binding_flags = IMMUTABLE_IS_INITIALIZED; |
return context; |
} |
} |