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

Unified Diff: src/elements.cc

Issue 23622016: limit InitialMaxFastElement by MaxRegularSpaceAllocationSize (Closed) Base URL: https://github.com/v8/v8.git@master
Patch Set: Created 7 years, 4 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/code-stubs-hydrogen.cc ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/elements.cc
diff --git a/src/elements.cc b/src/elements.cc
index 5cef12bbd216df2db3e6192607a69e5ff1efd332..3fdc83a200e68538d3c2a38e1c694206d3a506ab 100644
--- a/src/elements.cc
+++ b/src/elements.cc
@@ -1978,7 +1978,7 @@ MUST_USE_RESULT MaybeObject* ArrayConstructInitializeElements(
Object* obj = (*args)[0];
if (obj->IsSmi()) {
int len = Smi::cast(obj)->value();
- if (len > 0 && len < JSObject::kInitialMaxFastElementArray) {
+ if (len > 0 && len < JSObject::InitialMaxFastElementArray(heap)) {
ElementsKind elements_kind = array->GetElementsKind();
MaybeObject* maybe_array = array->Initialize(len, len);
if (maybe_array->IsFailure()) return maybe_array;
« no previous file with comments | « src/code-stubs-hydrogen.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698