Reviewers: Mads Ager, Description: Fixed some details in GetPropertyAttributeWithFailedAccessCheck
Please review this at http://codereview.chromium.org/8959 SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/ Affected files: M src/objects.cc Index: src/objects.cc =================================================================== --- src/objects.cc (revision 665) +++ src/objects.cc (working copy) @@ -288,10 +288,11 @@ case NORMAL: case FIELD: case CONSTANT_FUNCTION: { + if (!continue_search) break; // Search ALL_CAN_READ accessors in prototype chain. LookupResult r; result->holder()->LookupRealNamedPropertyInPrototypes(name, &r); - if (r.IsValid() && continue_search) { + if (r.IsValid()) { return GetPropertyAttributeWithFailedAccessCheck(receiver, &r, name, @@ -304,8 +305,12 @@ // If the object has an interceptor, try real named properties. // No access check in GetPropertyAttributeWithInterceptor. LookupResult r; - result->holder()->LookupRealNamedProperty(name, &r); - if (r.IsValid() && continue_search) { + if (continue_search) { + result->holder()->LookupRealNamedProperty(name, &r); + } else { + result->holder()->LocalLookupRealNamedProperty(name, &r); + } + if (r.IsValid()) { return GetPropertyAttributeWithFailedAccessCheck(receiver, &r, name, --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
