OLD | NEW |
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 #include "src/lookup.h" | 5 #include "src/lookup.h" |
6 | 6 |
7 #include "src/bootstrapper.h" | 7 #include "src/bootstrapper.h" |
8 #include "src/deoptimizer.h" | 8 #include "src/deoptimizer.h" |
9 #include "src/elements.h" | 9 #include "src/elements.h" |
10 #include "src/field-type.h" | 10 #include "src/field-type.h" |
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
599 DisallowHeapAllocation no_gc; | 599 DisallowHeapAllocation no_gc; |
600 if (interceptor_state_ == InterceptorState::kProcessNonMasking) { | 600 if (interceptor_state_ == InterceptorState::kProcessNonMasking) { |
601 return LookupNonMaskingInterceptorInHolder(map, holder); | 601 return LookupNonMaskingInterceptorInHolder(map, holder); |
602 } | 602 } |
603 switch (state_) { | 603 switch (state_) { |
604 case NOT_FOUND: | 604 case NOT_FOUND: |
605 if (map->IsJSProxyMap()) { | 605 if (map->IsJSProxyMap()) { |
606 // Do not leak private property names. | 606 // Do not leak private property names. |
607 if (IsElement() || !name_->IsPrivate()) return JSPROXY; | 607 if (IsElement() || !name_->IsPrivate()) return JSPROXY; |
608 } | 608 } |
609 if (map->is_access_check_needed() && | 609 if (map->is_access_check_needed()) { |
610 (IsElement() || !isolate_->IsInternallyUsedPropertyName(name_))) { | 610 if (IsElement() || !name_->IsPrivate()) return ACCESS_CHECK; |
611 return ACCESS_CHECK; | |
612 } | 611 } |
613 // Fall through. | 612 // Fall through. |
614 case ACCESS_CHECK: | 613 case ACCESS_CHECK: |
615 if (check_interceptor() && HasInterceptor(map) && | 614 if (check_interceptor() && HasInterceptor(map) && |
616 !SkipInterceptor(JSObject::cast(holder))) { | 615 !SkipInterceptor(JSObject::cast(holder))) { |
617 // Do not leak private property names. | 616 // Do not leak private property names. |
618 if (!name_.is_null() && name_->IsPrivate()) return NOT_FOUND; | 617 if (!name_.is_null() && name_->IsPrivate()) return NOT_FOUND; |
619 return INTERCEPTOR; | 618 return INTERCEPTOR; |
620 } | 619 } |
621 // Fall through. | 620 // Fall through. |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
682 // Fall through. | 681 // Fall through. |
683 default: | 682 default: |
684 return NOT_FOUND; | 683 return NOT_FOUND; |
685 } | 684 } |
686 UNREACHABLE(); | 685 UNREACHABLE(); |
687 return state_; | 686 return state_; |
688 } | 687 } |
689 | 688 |
690 } // namespace internal | 689 } // namespace internal |
691 } // namespace v8 | 690 } // namespace v8 |
OLD | NEW |