Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(639)

Unified Diff: src/isolate.cc

Issue 2405253006: [builtins] implement Array.prototype[@@iterator] in TFJ builtins (Closed)
Patch Set: add array_iterator_protector, and check array_protector in holey fast arrays Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/isolate.cc
diff --git a/src/isolate.cc b/src/isolate.cc
index cbde8ac562bd515f706e639f4f2710a068f94463..0e7950b98cfec9a26fdb56f7884f228cc8afeff6 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -1098,7 +1098,7 @@ Object* Isolate::Throw(Object* exception, MessageLocation* location) {
location = &computed_location;
}
- if (bootstrapper()->IsActive()) {
+ if (false && bootstrapper()->IsActive()) {
// It's not safe to try to make message objects or collect stack traces
// while the bootstrapper is active since the infrastructure may not have
// been properly initialized.
@@ -2924,6 +2924,14 @@ void Isolate::InvalidateStringLengthOverflowProtector() {
DCHECK(!IsStringLengthOverflowIntact());
}
+void Isolate::InvalidateArrayIteratorProtector() {
+ DCHECK(Smi::cast(heap()->array_iterator_protector()->value())->value() ==
+ kArrayProtectorValid);
+ PropertyCell::SetValueWithInvalidation(
+ factory()->array_iterator_protector(),
+ handle(Smi::FromInt(kArrayProtectorInvalid), this));
+}
+
bool Isolate::IsAnyInitialArrayPrototype(Handle<JSArray> array) {
DisallowHeapAllocation no_gc;
return IsInAnyContext(*array, Context::INITIAL_ARRAY_PROTOTYPE_INDEX);
« src/builtins/builtins-array.cc ('K') | « src/isolate.h ('k') | src/js/array.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698