Chromium Code Reviews| Index: src/lookup.cc |
| diff --git a/src/lookup.cc b/src/lookup.cc |
| index 70a0af7190e60cf609ce8774a8f15d6ae1629072..7fb8a6f0486e53dba247ab285c9ec681be1a9f85 100644 |
| --- a/src/lookup.cc |
| +++ b/src/lookup.cc |
| @@ -355,7 +355,7 @@ void LookupIterator::WriteDataValue(Handle<Object> value) { |
| bool LookupIterator::IsIntegerIndexedExotic(JSReceiver* holder) { |
| - DCHECK_NE(ExoticIndexState::kNotExotic, exotic_index_state_); |
| + DCHECK(ExoticIndexState::kNotExotic != exotic_index_state_); |
|
Jakob Kummerow
2015/05/20 09:06:50
nit: the condition reads more naturally if you swa
|
| // Currently typed arrays are the only such objects. |
| if (!holder->IsJSTypedArray()) return false; |
| if (exotic_index_state_ == ExoticIndexState::kExotic) return true; |
| @@ -386,6 +386,14 @@ bool LookupIterator::HasInterceptor(Map* map) const { |
| } |
| +Handle<InterceptorInfo> LookupIterator::GetInterceptor() const { |
| + DCHECK_EQ(INTERCEPTOR, state_); |
| + Handle<JSObject> js_holder = Handle<JSObject>::cast(holder_); |
| + if (IsElement()) return handle(js_holder->GetIndexedInterceptor(), isolate_); |
| + return handle(js_holder->GetNamedInterceptor(), isolate_); |
| +} |
| + |
| + |
| bool LookupIterator::SkipInterceptor(JSObject* holder) { |
| auto info = holder->GetNamedInterceptor(); |
| // TODO(dcarney): check for symbol/can_intercept_symbols here as well. |