Index: src/runtime.cc |
diff --git a/src/runtime.cc b/src/runtime.cc |
index d8da56ced5a4bc7c9f6e9b2f23226f3f5e1bc155..f3b6e2c6a7f9f585b77b44d63f6314fdd0f0c542 100644 |
--- a/src/runtime.cc |
+++ b/src/runtime.cc |
@@ -1300,7 +1300,10 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_DeclareGlobals) { |
// value of the variable if the property is already there. |
// Do the lookup locally only, see ES5 errata. |
LookupResult lookup(isolate); |
- global->LocalLookup(*name, &lookup); |
+ if (FLAG_es52_globals) |
+ global->LocalLookup(*name, &lookup); |
+ else |
+ global->Lookup(*name, &lookup); |
if (lookup.IsProperty()) { |
// We found an existing property. Unless it was an interceptor |
// that claims the property is absent, skip this declaration. |