Author: olehougaard
Date: Fri Oct 31 03:11:39 2008
New Revision: 667

Modified:
    branches/bleeding_edge/src/objects.cc

Log:
Fixed some details in GetPropertyAttributeWithFailedAccessCheck
Review URL: http://codereview.chromium.org/8959

Modified: branches/bleeding_edge/src/objects.cc
==============================================================================
--- branches/bleeding_edge/src/objects.cc       (original)
+++ branches/bleeding_edge/src/objects.cc       Fri Oct 31 03:11:39 2008
@@ -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
-~----------~----~----~----~------~----~------~--~---

Reply via email to