Index: src/isolate.cc |
diff --git a/src/isolate.cc b/src/isolate.cc |
index 995b2628becda2e6e9ead6f69e46c4563636535e..41a4e872fb01c3fde2a9507086e0de012102fac6 100644 |
--- a/src/isolate.cc |
+++ b/src/isolate.cc |
@@ -2951,6 +2951,15 @@ void Isolate::InvalidateStringLengthOverflowProtector() { |
DCHECK(!IsStringLengthOverflowIntact()); |
} |
+void Isolate::InvalidateArrayIteratorProtector() { |
+ DCHECK(factory()->array_iterator_protector()->value()->IsSmi()); |
+ DCHECK(CanInlineArrayIterator()); |
+ PropertyCell::SetValueWithInvalidation( |
+ factory()->array_iterator_protector(), |
+ handle(Smi::FromInt(kArrayProtectorInvalid), this)); |
+ DCHECK(!CanInlineArrayIterator()); |
+} |
+ |
bool Isolate::IsAnyInitialArrayPrototype(Handle<JSArray> array) { |
DisallowHeapAllocation no_gc; |
return IsInAnyContext(*array, Context::INITIAL_ARRAY_PROTOTYPE_INDEX); |