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

Unified Diff: src/heap/heap.cc

Issue 1256283003: Fully deprecate FixedArray::CopySize method. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_issue-cr-513507
Patch Set: Rebased. Created 5 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/heap/heap.h ('k') | src/isolate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index a19cba1cfbc5382e94e369a5c72bb9ac6e097e98..c8372f468bf22b7446e9cf6ccb1bcf21a0c03cf6 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -4457,12 +4457,14 @@ AllocationResult Heap::AllocateEmptyFixedTypedArray(
}
-AllocationResult Heap::CopyFixedArrayAndGrow(FixedArray* src, int grow_by) {
+AllocationResult Heap::CopyFixedArrayAndGrow(FixedArray* src, int grow_by,
+ PretenureFlag pretenure) {
int old_len = src->length();
int new_len = old_len + grow_by;
+ DCHECK(new_len >= old_len);
HeapObject* obj;
{
- AllocationResult allocation = AllocateRawFixedArray(new_len, NOT_TENURED);
+ AllocationResult allocation = AllocateRawFixedArray(new_len, pretenure);
if (!allocation.To(&obj)) return allocation;
}
obj->set_map_no_write_barrier(fixed_array_map());
« no previous file with comments | « src/heap/heap.h ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698