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

Side by Side Diff: src/lookup-inl.h

Issue 956283003: Don't perform access checks for internally used properties (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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 unified diff | Download patch
« 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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_LOOKUP_INL_H_ 5 #ifndef V8_LOOKUP_INL_H_
6 #define V8_LOOKUP_INL_H_ 6 #define V8_LOOKUP_INL_H_
7 7
8 #include "src/lookup.h" 8 #include "src/lookup.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 20 matching lines...) Expand all
31 } 31 }
32 32
33 33
34 LookupIterator::State LookupIterator::LookupInHolder(Map* map, 34 LookupIterator::State LookupIterator::LookupInHolder(Map* map,
35 JSReceiver* holder) { 35 JSReceiver* holder) {
36 STATIC_ASSERT(INTERCEPTOR == BEFORE_PROPERTY); 36 STATIC_ASSERT(INTERCEPTOR == BEFORE_PROPERTY);
37 DisallowHeapAllocation no_gc; 37 DisallowHeapAllocation no_gc;
38 switch (state_) { 38 switch (state_) {
39 case NOT_FOUND: 39 case NOT_FOUND:
40 if (map->IsJSProxyMap()) return JSPROXY; 40 if (map->IsJSProxyMap()) return JSPROXY;
41 if (map->is_access_check_needed()) return ACCESS_CHECK; 41 if (map->is_access_check_needed() &&
42 !isolate_->IsInternallyUsedPropertyName(name_)) {
43 return ACCESS_CHECK;
44 }
42 // Fall through. 45 // Fall through.
43 case ACCESS_CHECK: 46 case ACCESS_CHECK:
44 if (check_interceptor() && map->has_named_interceptor()) { 47 if (check_interceptor() && map->has_named_interceptor()) {
45 return INTERCEPTOR; 48 return INTERCEPTOR;
46 } 49 }
47 // Fall through. 50 // Fall through.
48 case INTERCEPTOR: 51 case INTERCEPTOR:
49 if (map->is_dictionary_map()) { 52 if (map->is_dictionary_map()) {
50 NameDictionary* dict = JSObject::cast(holder)->property_dictionary(); 53 NameDictionary* dict = JSObject::cast(holder)->property_dictionary();
51 number_ = dict->FindEntry(name_); 54 number_ = dict->FindEntry(name_);
(...skipping 24 matching lines...) Expand all
76 case TRANSITION: 79 case TRANSITION:
77 UNREACHABLE(); 80 UNREACHABLE();
78 } 81 }
79 UNREACHABLE(); 82 UNREACHABLE();
80 return state_; 83 return state_;
81 } 84 }
82 } 85 }
83 } // namespace v8::internal 86 } // namespace v8::internal
84 87
85 #endif // V8_LOOKUP_INL_H_ 88 #endif // V8_LOOKUP_INL_H_
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