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

Unified Diff: src/runtime/runtime-typedarray.cc

Issue 1324023007: [heap] introduce ArrayBufferTracker (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: split out Created 5 years, 3 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
« src/objects.cc ('K') | « src/objects.cc ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-typedarray.cc
diff --git a/src/runtime/runtime-typedarray.cc b/src/runtime/runtime-typedarray.cc
index 7c2e277b3f270a74456a9c397aec81d6232e17d5..56b004eb091527b2adb3932af55fac6cbf77fbce 100644
--- a/src/runtime/runtime-typedarray.cc
+++ b/src/runtime/runtime-typedarray.cc
@@ -6,6 +6,7 @@
#include "src/arguments.h"
#include "src/factory.h"
+#include "src/heap/array-buffer-tracker.h"
Michael Lippautz 2015/09/04 08:24:15 Only include src/heap/heap.h
fedor.indutny 2015/09/04 08:58:05 Acknowledged, doesn't look like it is needed.
#include "src/messages.h"
#include "src/objects-inl.h"
#include "src/runtime/runtime.h"
@@ -92,9 +93,8 @@ RUNTIME_FUNCTION(Runtime_ArrayBufferNeuter) {
void* backing_store = array_buffer->backing_store();
size_t byte_length = NumberToSize(isolate, array_buffer->byte_length());
array_buffer->set_is_external(true);
+ isolate->heap()->array_buffer_tracker()->Unregister(*array_buffer);
Michael Lippautz 2015/09/04 08:24:16 Use the wrapper call for Unregister.
fedor.indutny 2015/09/04 08:58:05 Acknowledged.
array_buffer->Neuter();
- isolate->heap()->UnregisterArrayBuffer(
- isolate->heap()->InNewSpace(*array_buffer), backing_store);
isolate->array_buffer_allocator()->Free(backing_store, byte_length);
return isolate->heap()->undefined_value();
}
« src/objects.cc ('K') | « src/objects.cc ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698