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

Side by Side 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, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 if (info->all_can_read()) { 281 if (info->all_can_read()) {
282 return result->GetAttributes(); 282 return result->GetAttributes();
283 } 283 }
284 } 284 }
285 break; 285 break;
286 } 286 }
287 287
288 case NORMAL: 288 case NORMAL:
289 case FIELD: 289 case FIELD:
290 case CONSTANT_FUNCTION: { 290 case CONSTANT_FUNCTION: {
291 if (!continue_search) break;
291 // Search ALL_CAN_READ accessors in prototype chain. 292 // Search ALL_CAN_READ accessors in prototype chain.
292 LookupResult r; 293 LookupResult r;
293 result->holder()->LookupRealNamedPropertyInPrototypes(name, &r); 294 result->holder()->LookupRealNamedPropertyInPrototypes(name, &r);
294 if (r.IsValid() && continue_search) { 295 if (r.IsValid()) {
295 return GetPropertyAttributeWithFailedAccessCheck(receiver, 296 return GetPropertyAttributeWithFailedAccessCheck(receiver,
296 &r, 297 &r,
297 name, 298 name,
298 continue_search); 299 continue_search);
299 } 300 }
300 break; 301 break;
301 } 302 }
302 303
303 case INTERCEPTOR: { 304 case INTERCEPTOR: {
304 // If the object has an interceptor, try real named properties. 305 // If the object has an interceptor, try real named properties.
305 // No access check in GetPropertyAttributeWithInterceptor. 306 // No access check in GetPropertyAttributeWithInterceptor.
306 LookupResult r; 307 LookupResult r;
307 result->holder()->LookupRealNamedProperty(name, &r); 308 if (continue_search) {
308 if (r.IsValid() && continue_search) { 309 result->holder()->LookupRealNamedProperty(name, &r);
310 } else {
311 result->holder()->LocalLookupRealNamedProperty(name, &r);
312 }
313 if (r.IsValid()) {
309 return GetPropertyAttributeWithFailedAccessCheck(receiver, 314 return GetPropertyAttributeWithFailedAccessCheck(receiver,
310 &r, 315 &r,
311 name, 316 name,
312 continue_search); 317 continue_search);
313 } 318 }
314 break; 319 break;
315 } 320 }
316 321
317 default: { 322 default: {
318 break; 323 break;
(...skipping 6553 matching lines...) Expand 10 before | Expand all | Expand 10 after
6872 // No break point. 6877 // No break point.
6873 if (break_point_objects()->IsUndefined()) return 0; 6878 if (break_point_objects()->IsUndefined()) return 0;
6874 // Single beak point. 6879 // Single beak point.
6875 if (!break_point_objects()->IsFixedArray()) return 1; 6880 if (!break_point_objects()->IsFixedArray()) return 1;
6876 // Multiple break points. 6881 // Multiple break points.
6877 return FixedArray::cast(break_point_objects())->length(); 6882 return FixedArray::cast(break_point_objects())->length();
6878 } 6883 }
6879 6884
6880 6885
6881 } } // namespace v8::internal 6886 } } // namespace v8::internal
OLDNEW
« 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