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

Unified Diff: src/objects.cc

Issue 8959: Fixed some details in GetPropertyAttributeWithFailedAccessCheck (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 years, 2 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 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,
« 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