Index: src/ic/ic.h |
diff --git a/src/ic/ic.h b/src/ic/ic.h |
index cf2036dee011b8a558e45c911abee78afeee624a..d321a9cdd50b905d48370bb08e78e1e9a788f316 100644 |
--- a/src/ic/ic.h |
+++ b/src/ic/ic.h |
@@ -276,10 +276,13 @@ class LoadIC : public IC { |
DCHECK(IsLoadStub()); |
} |
+ static bool ShouldThrowReferenceError(FeedbackVectorSlotKind kind) { |
+ return kind == FeedbackVectorSlotKind::LOAD_GLOBAL_NOT_INSIDE_TYPEOF_IC; |
+ } |
+ |
bool ShouldThrowReferenceError() const { |
- return kind() == Code::LOAD_GLOBAL_IC && |
- LoadGlobalICState::GetTypeofMode(extra_ic_state()) == |
- NOT_INSIDE_TYPEOF; |
+ return UseVector() && ShouldThrowReferenceError( |
+ nexus()->vector()->GetKind(nexus()->slot())); |
} |
MUST_USE_RESULT MaybeHandle<Object> Load(Handle<Object> object, |