| Index: src/contexts.cc
|
| diff --git a/src/contexts.cc b/src/contexts.cc
|
| index 93c9795404bb52690c6cc3c4e1b560b4f9a076c6..44226d8827f44484a3186b14275e74cc0c559f28 100644
|
| --- a/src/contexts.cc
|
| +++ b/src/contexts.cc
|
| @@ -55,6 +55,15 @@ JSBuiltinsObject* Context::builtins() {
|
| }
|
|
|
|
|
| +Context* Context::global_context() {
|
| + Context* current = this;
|
| + while (!current->IsGlobalContext()) {
|
| + current = current->previous();
|
| + }
|
| + return current;
|
| +}
|
| +
|
| +
|
| Context* Context::native_context() {
|
| // Fast case: the global object for this context has been set. In
|
| // that case, the global object has a direct pointer to the global
|
| @@ -183,6 +192,10 @@ Handle<Object> Context::Lookup(Handle<String> name,
|
| ? IMMUTABLE_CHECK_INITIALIZED_HARMONY :
|
| IMMUTABLE_IS_INITIALIZED_HARMONY;
|
| break;
|
| + case MODULE:
|
| + *attributes = READ_ONLY;
|
| + *binding_flags = IMMUTABLE_IS_INITIALIZED_HARMONY;
|
| + break;
|
| case DYNAMIC:
|
| case DYNAMIC_GLOBAL:
|
| case DYNAMIC_LOCAL:
|
|
|