Commit 2a6c90e6 authored by olehougaard's avatar olehougaard

Fixed some details in GetPropertyAttributeWithFailedAccessCheck

Review URL: http://codereview.chromium.org/8959

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@667 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent b9a251a9
...@@ -288,10 +288,11 @@ PropertyAttributes JSObject::GetPropertyAttributeWithFailedAccessCheck( ...@@ -288,10 +288,11 @@ PropertyAttributes JSObject::GetPropertyAttributeWithFailedAccessCheck(
case NORMAL: case NORMAL:
case FIELD: case FIELD:
case CONSTANT_FUNCTION: { case CONSTANT_FUNCTION: {
if (!continue_search) break;
// Search ALL_CAN_READ accessors in prototype chain. // Search ALL_CAN_READ accessors in prototype chain.
LookupResult r; LookupResult r;
result->holder()->LookupRealNamedPropertyInPrototypes(name, &r); result->holder()->LookupRealNamedPropertyInPrototypes(name, &r);
if (r.IsValid() && continue_search) { if (r.IsValid()) {
return GetPropertyAttributeWithFailedAccessCheck(receiver, return GetPropertyAttributeWithFailedAccessCheck(receiver,
&r, &r,
name, name,
...@@ -304,8 +305,12 @@ PropertyAttributes JSObject::GetPropertyAttributeWithFailedAccessCheck( ...@@ -304,8 +305,12 @@ PropertyAttributes JSObject::GetPropertyAttributeWithFailedAccessCheck(
// If the object has an interceptor, try real named properties. // If the object has an interceptor, try real named properties.
// No access check in GetPropertyAttributeWithInterceptor. // No access check in GetPropertyAttributeWithInterceptor.
LookupResult r; LookupResult r;
if (continue_search) {
result->holder()->LookupRealNamedProperty(name, &r); result->holder()->LookupRealNamedProperty(name, &r);
if (r.IsValid() && continue_search) { } else {
result->holder()->LocalLookupRealNamedProperty(name, &r);
}
if (r.IsValid()) {
return GetPropertyAttributeWithFailedAccessCheck(receiver, return GetPropertyAttributeWithFailedAccessCheck(receiver,
&r, &r,
name, name,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment