Index: src/lookup.cc |
diff --git a/src/lookup.cc b/src/lookup.cc |
index 8eb5571e51e8dec93eae765b6bc79da9dd877097..79407d93ee6b4a398c0d6c25c3084f27580a5d31 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(ExoticIndexState::kNotExotic != exotic_index_state_); |
+ DCHECK(exotic_index_state_ != ExoticIndexState::kNotExotic); |
// 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. |