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

Unified Diff: src/api.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
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index 2cb41a09215ebfe985786c06e2fc35442aa72dff..5d546481b2c04daa4437591c1e8f045f41ef5537 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -32,6 +32,7 @@
#include "src/deoptimizer.h"
#include "src/execution.h"
#include "src/global-handles.h"
+#include "src/heap/array-buffer-tracker.h"
Michael Lippautz 2015/09/04 08:24:15 Include only src/heap/heap.h
fedor.indutny 2015/09/04 08:58:05 Acknowledged, doesn't look like it is needed.
#include "src/heap-profiler.h"
#include "src/heap-snapshot-generator-inl.h"
#include "src/icu_util.h"
@@ -6509,8 +6510,7 @@ v8::ArrayBuffer::Contents v8::ArrayBuffer::Externalize() {
Utils::ApiCheck(!self->is_external(), "v8::ArrayBuffer::Externalize",
"ArrayBuffer already externalized");
self->set_is_external(true);
- isolate->heap()->UnregisterArrayBuffer(isolate->heap()->InNewSpace(*self),
- self->backing_store());
+ isolate->heap()->array_buffer_tracker()->Unregister(*self);
Michael Lippautz 2015/09/04 08:24:15 Use the wrapper call for Unregister.
fedor.indutny 2015/09/04 08:58:05 Acknowledged.
return GetContents();
}
@@ -6719,8 +6719,7 @@ v8::SharedArrayBuffer::Contents v8::SharedArrayBuffer::Externalize() {
Utils::ApiCheck(!self->is_external(), "v8::SharedArrayBuffer::Externalize",
"SharedArrayBuffer already externalized");
self->set_is_external(true);
- isolate->heap()->UnregisterArrayBuffer(isolate->heap()->InNewSpace(*self),
- self->backing_store());
+ isolate->heap()->array_buffer_tracker()->Unregister(*self);
Michael Lippautz 2015/09/04 08:24:15 Ditto.
fedor.indutny 2015/09/04 08:58:05 Acknowledged.
return GetContents();
}

Powered by Google App Engine
This is Rietveld 408576698