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

Unified Diff: src/contexts.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/api.cc ('k') | src/debug/debug-evaluate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/contexts.cc
diff --git a/src/contexts.cc b/src/contexts.cc
index 8263269d117c2d06a6f8fd2947f31097ef942895..9f39aecd542ca24dbbad3bf7baf1109e853494ba 100644
--- a/src/contexts.cc
+++ b/src/contexts.cc
@@ -20,8 +20,11 @@ Handle<ScriptContextTable> ScriptContextTable::Extend(
CHECK(used >= 0 && length > 0 && used < length);
if (used + 1 == length) {
CHECK(length < Smi::kMaxValue / 2);
- result = Handle<ScriptContextTable>::cast(
- FixedArray::CopySize(table, length * 2));
+ Isolate* isolate = table->GetIsolate();
+ Handle<FixedArray> copy =
+ isolate->factory()->CopyFixedArrayAndGrow(table, length);
+ copy->set_map(isolate->heap()->script_context_table_map());
+ result = Handle<ScriptContextTable>::cast(copy);
} else {
result = table;
}
« no previous file with comments | « src/api.cc ('k') | src/debug/debug-evaluate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698