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

Unified Diff: src/objects.cc

Issue 1099453007: Empty Array prototype elements protection needs to alert on length change. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: With comments. Created 5 years, 8 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
« no previous file with comments | « src/isolate.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 76e97b1b2268193b7eb0da7788e271fb734182c8..e958400f9a278ea670a35c819eb55febc6732bc8 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -11898,8 +11898,11 @@ Handle<FixedArray> JSObject::SetFastElementsCapacityAndLength(
DCHECK(!object->HasExternalArrayElements());
// Allocate a new fast elements backing store.
+ Isolate* isolate = object->GetIsolate();
Handle<FixedArray> new_elements =
- object->GetIsolate()->factory()->NewUninitializedFixedArray(capacity);
+ isolate->factory()->NewUninitializedFixedArray(capacity);
+
+ isolate->UpdateArrayProtectorOnSetLength(object);
ElementsKind elements_kind = object->GetElementsKind();
ElementsKind new_elements_kind;
« no previous file with comments | « src/isolate.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698