Chromium Code Reviews

Unified Diff: src/api.cc

Issue 1298113003: [api,heap] Fix external GC callbacks. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index 46cac758f08ba3c75a0bc0767554f7bb431ea426..0f5e7893c2f165ba969a96ede6a5693c472503cb 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -6990,7 +6990,8 @@ void Isolate::SetReference(internal::Object** parent,
void Isolate::AddGCPrologueCallback(GCPrologueCallback callback,
GCType gc_type) {
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
- isolate->heap()->AddGCPrologueCallback(callback, gc_type);
+ GCCallback new_callback = reinterpret_cast<GCCallback>(callback);
+ isolate->heap()->AddGCPrologueCallback(new_callback, gc_type);
}
@@ -7003,7 +7004,8 @@ void Isolate::RemoveGCPrologueCallback(GCPrologueCallback callback) {
void Isolate::AddGCEpilogueCallback(GCEpilogueCallback callback,
GCType gc_type) {
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
- isolate->heap()->AddGCEpilogueCallback(callback, gc_type);
+ GCCallback new_callback = reinterpret_cast<GCCallback>(callback);
+ isolate->heap()->AddGCEpilogueCallback(new_callback, gc_type);
}

Powered by Google App Engine