Index: src/isolate.cc |
diff --git a/src/isolate.cc b/src/isolate.cc |
index b0139a70a68e4fc4f32bdf94c4833cc233087986..bd179ec07e7116acca4d478497cc03382a2bd822 100644 |
--- a/src/isolate.cc |
+++ b/src/isolate.cc |
@@ -2953,6 +2953,14 @@ void Isolate::InvalidateStringLengthOverflowProtector() { |
DCHECK(!IsStringLengthOverflowIntact()); |
} |
+void Isolate::InvalidateArrayIteratorProtector() { |
+ DCHECK(factory()->array_iterator_protector()->value()->IsSmi()); |
+ DCHECK(IsArrayIteratorLookupChainIntact()); |
+ factory()->array_iterator_protector()->set_value( |
+ Smi::FromInt(kArrayProtectorInvalid)); |
+ DCHECK(!IsArrayIteratorLookupChainIntact()); |
+} |
+ |
bool Isolate::IsAnyInitialArrayPrototype(Handle<JSArray> array) { |
DisallowHeapAllocation no_gc; |
return IsInAnyContext(*array, Context::INITIAL_ARRAY_PROTOTYPE_INDEX); |