Chromium Code Reviews| Index: src/lookup-inl.h |
| diff --git a/src/lookup-inl.h b/src/lookup-inl.h |
| index 50f4b0fcc9ddad89849b64fa71183077f8f97480..18bcbc50c5de7c2729fd771247980dcdc1e37764 100644 |
| --- a/src/lookup-inl.h |
| +++ b/src/lookup-inl.h |
| @@ -31,10 +31,13 @@ JSReceiver* LookupIterator::NextHolder(Map* map) { |
| } |
| -LookupIterator::State LookupIterator::LookupInHolder(Map* map, |
| - JSReceiver* holder) { |
| +LookupIterator::State LookupIterator::LookupInHolder(Map* const map, |
| + JSReceiver* const holder) { |
| STATIC_ASSERT(INTERCEPTOR == BEFORE_PROPERTY); |
| DisallowHeapAllocation no_gc; |
| + if (interceptor_state_ == InterceptorState::kProcessNonMasking) { |
| + return LookupNonMaskingInterceptorInHolder(map, holder); |
| + } |
| switch (state_) { |
| case NOT_FOUND: |
| if (map->IsJSProxyMap()) return JSPROXY; |
| @@ -44,7 +47,8 @@ LookupIterator::State LookupIterator::LookupInHolder(Map* map, |
| } |
| // Fall through. |
| case ACCESS_CHECK: |
| - if (check_interceptor() && map->has_named_interceptor()) { |
| + if (check_interceptor() && map->has_named_interceptor() && |
| + !SkipInterceptor(JSObject::cast(holder))) { |
| return INTERCEPTOR; |
| } |
| // Fall through. |
| @@ -82,6 +86,29 @@ LookupIterator::State LookupIterator::LookupInHolder(Map* map, |
| UNREACHABLE(); |
| return state_; |
| } |
| + |
| + |
| +LookupIterator::State LookupIterator::LookupNonMaskingInterceptorInHolder( |
| + Map* const map, JSReceiver* const holder) { |
| + switch (state_) { |
| + case NOT_FOUND: |
| + if (map->is_access_check_needed() && |
| + !isolate_->IsInternallyUsedPropertyName(name_)) { |
|
Toon Verwaest
2015/03/11 14:09:35
You don't need these, given that you had to have a
|
| + return ACCESS_CHECK; |
| + } |
| + // Fall through. |
| + case ACCESS_CHECK: |
| + if (check_interceptor() && map->has_named_interceptor() && |
| + !SkipInterceptor(JSObject::cast(holder))) { |
| + return INTERCEPTOR; |
| + } |
| + // Fall through. |
| + default: |
| + return NOT_FOUND; |
| + } |
| + UNREACHABLE(); |
| + return state_; |
| +} |
| } |
| } // namespace v8::internal |