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

Unified Diff: src/transitions.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/objects.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/transitions.cc
diff --git a/src/transitions.cc b/src/transitions.cc
index f00f33146792df503ffe9cd333bb0206e87c97b2..9870e17d83925040e952876c4263cc662f09be78 100644
--- a/src/transitions.cc
+++ b/src/transitions.cc
@@ -255,8 +255,10 @@ void TransitionArray::PutPrototypeTransition(Handle<Map> map,
// Grow array by factor 2 up to MaxCachedPrototypeTransitions.
int new_capacity = Min(kMaxCachedPrototypeTransitions, transitions * 2);
if (new_capacity == capacity) return;
+ int grow_by = new_capacity - capacity;
- cache = FixedArray::CopySize(cache, header + new_capacity);
+ Isolate* isolate = map->GetIsolate();
+ cache = isolate->factory()->CopyFixedArrayAndGrow(cache, grow_by);
if (capacity < 0) {
// There was no prototype transitions array before, so the size
// couldn't be copied. Initialize it explicitly.
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698