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/isolate-inl.h" | 10 #include "src/isolate-inl.h" |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 PrototypeIterator iter(isolate(), receiver_); | 127 PrototypeIterator iter(isolate(), receiver_); |
128 if (iter.IsAtEnd()) return Handle<JSGlobalProxy>::cast(receiver_); | 128 if (iter.IsAtEnd()) return Handle<JSGlobalProxy>::cast(receiver_); |
129 return PrototypeIterator::GetCurrent<JSGlobalObject>(iter); | 129 return PrototypeIterator::GetCurrent<JSGlobalObject>(iter); |
130 } | 130 } |
131 return Handle<JSObject>::cast(receiver_); | 131 return Handle<JSObject>::cast(receiver_); |
132 } | 132 } |
133 | 133 |
134 | 134 |
135 bool LookupIterator::HasAccess() const { | 135 bool LookupIterator::HasAccess() const { |
136 DCHECK_EQ(ACCESS_CHECK, state_); | 136 DCHECK_EQ(ACCESS_CHECK, state_); |
137 return isolate_->MayAccess(GetHolder<JSObject>()); | 137 return isolate_->MayAccess(handle(isolate_->context()), |
| 138 GetHolder<JSObject>()); |
138 } | 139 } |
139 | 140 |
140 | 141 |
141 void LookupIterator::ReloadPropertyInformation() { | 142 void LookupIterator::ReloadPropertyInformation() { |
142 state_ = BEFORE_PROPERTY; | 143 state_ = BEFORE_PROPERTY; |
143 interceptor_state_ = InterceptorState::kUninitialized; | 144 interceptor_state_ = InterceptorState::kUninitialized; |
144 state_ = LookupInHolder(*holder_map_, *holder_); | 145 state_ = LookupInHolder(*holder_map_, *holder_); |
145 DCHECK(IsFound() || holder_map_->is_dictionary_map()); | 146 DCHECK(IsFound() || holder_map_->is_dictionary_map()); |
146 } | 147 } |
147 | 148 |
(...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
714 // Fall through. | 715 // Fall through. |
715 default: | 716 default: |
716 return NOT_FOUND; | 717 return NOT_FOUND; |
717 } | 718 } |
718 UNREACHABLE(); | 719 UNREACHABLE(); |
719 return state_; | 720 return state_; |
720 } | 721 } |
721 | 722 |
722 } // namespace internal | 723 } // namespace internal |
723 } // namespace v8 | 724 } // namespace v8 |
OLD | NEW |