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

Unified Diff: src/objects.cc

Issue 1177293003: Reland "Keep track of array buffers in new space separately" (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix Created 5 years, 6 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/objects-visiting-inl.h ('k') | src/runtime/runtime-typedarray.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 d6985f96a5e392e3aaa3aea6c02dc20a918281e1..c5ad52011d3e788730c6c1e5df050aa65419577f 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -16470,10 +16470,11 @@ Handle<JSArrayBuffer> JSTypedArray::MaterializeArrayBuffer(
void* backing_store =
isolate->array_buffer_allocator()->AllocateUninitialized(
fixed_typed_array->DataSize());
- isolate->heap()->RegisterNewArrayBuffer(backing_store,
- fixed_typed_array->DataSize());
buffer->set_backing_store(backing_store);
buffer->set_is_external(false);
+ isolate->heap()->RegisterNewArrayBuffer(isolate->heap()->InNewSpace(*buffer),
+ backing_store,
+ fixed_typed_array->DataSize());
memcpy(buffer->backing_store(),
fixed_typed_array->DataPtr(),
fixed_typed_array->DataSize());
« no previous file with comments | « src/heap/objects-visiting-inl.h ('k') | src/runtime/runtime-typedarray.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698