Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(599)

Unified Diff: src/runtime.cc

Issue 10628002: Add unit test for r11818. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/cctest/test-decls.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | test/cctest/test-decls.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698