| Index: src/runtime.cc
|
| diff --git a/src/runtime.cc b/src/runtime.cc
|
| index 7b233063c694542bd0ba46b6f842acb988e7c51f..d3b3502cf2e30f5ecbd0a65cabd4248f0dc5183a 100644
|
| --- a/src/runtime.cc
|
| +++ b/src/runtime.cc
|
| @@ -1317,8 +1317,9 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_DeclareGlobals) {
|
| Object* obj = *global;
|
| do {
|
| JSObject::cast(obj)->LocalLookup(*name, &lookup);
|
| + if (lookup.IsProperty()) break;
|
| obj = obj->GetPrototype();
|
| - } while (!lookup.IsFound() && obj->IsJSObject() &&
|
| + } while (obj->IsJSObject() &&
|
| JSObject::cast(obj)->map()->is_hidden_prototype());
|
| } else {
|
| global->Lookup(*name, &lookup);
|
|
|