| Index: src/runtime/runtime-scopes.cc
|
| diff --git a/src/runtime/runtime-scopes.cc b/src/runtime/runtime-scopes.cc
|
| index 7a523a7cac41b3783be5f99f381f313d76cdb3fa..c92f027264ce3edc2974d269eb2dc8cd91f2b083 100644
|
| --- a/src/runtime/runtime-scopes.cc
|
| +++ b/src/runtime/runtime-scopes.cc
|
| @@ -240,16 +240,11 @@
|
|
|
| // TODO(verwaest): This case should probably not be covered by this function,
|
| // but by DeclareGlobals instead.
|
| - if (attributes != ABSENT && holder->IsJSGlobalObject()) {
|
| + if ((attributes != ABSENT && holder->IsJSGlobalObject()) ||
|
| + (context_arg->has_extension() &&
|
| + context_arg->extension()->IsJSGlobalObject())) {
|
| return DeclareGlobals(isolate, Handle<JSGlobalObject>::cast(holder), name,
|
| value, attr, is_var, is_const, is_function);
|
| - }
|
| - if (context_arg->has_extension() &&
|
| - context_arg->extension()->IsJSGlobalObject()) {
|
| - Handle<JSGlobalObject> global(
|
| - JSGlobalObject::cast(context_arg->extension()), isolate);
|
| - return DeclareGlobals(isolate, global, name, value, attr, is_var, is_const,
|
| - is_function);
|
| }
|
|
|
| if (attributes != ABSENT) {
|
|
|