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 739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
750 case v8::internal::kData: | 750 case v8::internal::kData: |
751 return DATA; | 751 return DATA; |
752 case v8::internal::kAccessor: | 752 case v8::internal::kAccessor: |
753 return ACCESSOR; | 753 return ACCESSOR; |
754 } | 754 } |
755 | 755 |
756 UNREACHABLE(); | 756 UNREACHABLE(); |
757 return state_; | 757 return state_; |
758 } | 758 } |
759 | 759 |
| 760 Handle<InterceptorInfo> LookupIterator::GetInterceptorForFailedAccessCheck() |
| 761 const { |
| 762 DCHECK_EQ(ACCESS_CHECK, state_); |
| 763 DisallowHeapAllocation no_gc; |
| 764 AccessCheckInfo* access_check_info = |
| 765 AccessCheckInfo::Get(isolate_, Handle<JSObject>::cast(holder_)); |
| 766 if (access_check_info) { |
| 767 Object* interceptor = IsElement() ? access_check_info->indexed_interceptor() |
| 768 : access_check_info->named_interceptor(); |
| 769 if (interceptor) { |
| 770 return handle(InterceptorInfo::cast(interceptor), isolate_); |
| 771 } |
| 772 } |
| 773 return Handle<InterceptorInfo>(); |
| 774 } |
| 775 |
760 } // namespace internal | 776 } // namespace internal |
761 } // namespace v8 | 777 } // namespace v8 |
OLD | NEW |