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

Unified Diff: src/objects.cc

Issue 629008: Make sure that post-interceptor property getter doesn't assume name lookup is... (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 10 years, 10 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
===================================================================
--- src/objects.cc (revision 3836)
+++ src/objects.cc (working copy)
@@ -6170,7 +6170,13 @@
// Check local property in holder, ignore interceptor.
LookupResult result;
LocalLookupRealNamedProperty(name, &result);
- if (result.IsValid()) return GetProperty(receiver, &result, name, attributes);
+ if (result.IsValid()) {
+ Object* p = GetProperty(receiver, &result, name, attributes);
+ // Successful name lookup doesn't mean the value is there, because the
Mads Ager (chromium) 2010/02/18 08:29:30 There is something fishy going on here. The resul
+ // name could've been introduced by the interceptor. Only return property
+ // if it's not absent.
+ if (*attributes != ABSENT) return p;
+ }
// Continue searching via the prototype chain.
Object* pt = GetPrototype();
*attributes = ABSENT;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698