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

Unified Diff: src/api.cc

Issue 1815153002: Introduce EmbedderHeapTracer (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Gave the api a week to settle down and this is the result Created 4 years, 9 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 dea23a44f3df6e8e23496002d3bf913b48bd6c03..76f2bdc1f6035ee21616878f6d124a239eafc411 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -7174,6 +7174,15 @@ void V8::AddGCEpilogueCallback(GCCallback callback, GCType gc_type) {
reinterpret_cast<v8::Isolate::GCCallback>(callback), gc_type, false);
}
+void Isolate::SetEmbedderHeapTracer(EmbedderHeapTracer* tracer) {
+ i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
+ isolate->heap()->SetEmbedderHeapTracer(tracer);
+}
+
+EmbedderHeapTracer* Isolate::embedder_heap_tracer() {
+ i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
+ return isolate->heap()->embedder_heap_tracer();
+}
void Isolate::AddMemoryAllocationCallback(MemoryAllocationCallback callback,
ObjectSpace space,
@@ -7237,6 +7246,13 @@ Isolate* Isolate::GetCurrent() {
return reinterpret_cast<Isolate*>(isolate);
}
+void Isolate::AddObjectToMarkingDeque(PersistentBase<Object>* handle) {
+ internal::Object** object =
+ reinterpret_cast<internal::Object**>(handle->val_);
+ internal::Isolate* internal_isolate =
+ reinterpret_cast<internal::Isolate*>(this);
+ internal_isolate->heap()->AddObjectToMarkingDeque(object);
jochen (gone - plz use gerrit) 2016/03/30 16:44:45 we usually use i:: and i_ instead of internal. I'
Marcel Hlopko 2016/03/30 18:51:12 Done.
+}
Isolate* Isolate::New(const Isolate::CreateParams& params) {
i::Isolate* isolate = new i::Isolate(false);

Powered by Google App Engine
This is Rietveld 408576698