Commit 6381c541 authored by Ulan Degenbaev's avatar Ulan Degenbaev Committed by Commit Bot

[api] Remove deprecated GC callback functions.

This removes:
- V8::AddGCPrologueCallback
- V8::RemoveGCPrologueCallback
- V8::AddGCEpilogueCallback
- V8::RemoveGCEpilogueCallback

The emebedder should use the Isolate versions of these functions.

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I7974bc7478e542f29483cf939b33dbb872a3b41d
Reviewed-on: https://chromium-review.googlesource.com/788053Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49617}
parent 12633726
......@@ -7987,50 +7987,6 @@ class V8_EXPORT V8 {
"Use isolate version",
void SetFailedAccessCheckCallbackFunction(FailedAccessCheckCallback));
/**
* Enables the host application to receive a notification before a
* garbage collection. Allocations are not allowed in the
* callback function, you therefore cannot manipulate objects (set
* or delete properties for example) since it is possible such
* operations will result in the allocation of objects. It is possible
* to specify the GCType filter for your callback. But it is not possible to
* register the same callback function two times with different
* GCType filters.
*/
static V8_DEPRECATED(
"Use isolate version",
void AddGCPrologueCallback(GCCallback callback,
GCType gc_type_filter = kGCTypeAll));
/**
* This function removes callback which was installed by
* AddGCPrologueCallback function.
*/
static V8_DEPRECATED("Use isolate version",
void RemoveGCPrologueCallback(GCCallback callback));
/**
* Enables the host application to receive a notification after a
* garbage collection. Allocations are not allowed in the
* callback function, you therefore cannot manipulate objects (set
* or delete properties for example) since it is possible such
* operations will result in the allocation of objects. It is possible
* to specify the GCType filter for your callback. But it is not possible to
* register the same callback function two times with different
* GCType filters.
*/
static V8_DEPRECATED(
"Use isolate version",
void AddGCEpilogueCallback(GCCallback callback,
GCType gc_type_filter = kGCTypeAll));
/**
* This function removes callback which was installed by
* AddGCEpilogueCallback function.
*/
static V8_DEPRECATED("Use isolate version",
void RemoveGCEpilogueCallback(GCCallback callback));
/**
* Initializes V8. This function needs to be called before the first Isolate
* is created. It always returns true.
......
......@@ -8479,35 +8479,6 @@ void Isolate::RemoveGCEpilogueCallback(GCCallback callback) {
RemoveGCEpilogueCallback(CallGCCallbackWithoutData, data);
}
static void CallGCCallbackWithoutIsolate(Isolate* isolate, GCType type,
GCCallbackFlags flags, void* data) {
reinterpret_cast<v8::GCCallback>(data)(type, flags);
}
void V8::AddGCPrologueCallback(v8::GCCallback callback, GCType gc_type) {
void* data = reinterpret_cast<void*>(callback);
Isolate::GetCurrent()->AddGCPrologueCallback(CallGCCallbackWithoutIsolate,
data, gc_type);
}
void V8::AddGCEpilogueCallback(v8::GCCallback callback, GCType gc_type) {
void* data = reinterpret_cast<void*>(callback);
Isolate::GetCurrent()->AddGCEpilogueCallback(CallGCCallbackWithoutIsolate,
data, gc_type);
}
void V8::RemoveGCPrologueCallback(GCCallback callback) {
void* data = reinterpret_cast<void*>(callback);
Isolate::GetCurrent()->RemoveGCPrologueCallback(CallGCCallbackWithoutIsolate,
data);
}
void V8::RemoveGCEpilogueCallback(GCCallback callback) {
void* data = reinterpret_cast<void*>(callback);
Isolate::GetCurrent()->RemoveGCEpilogueCallback(CallGCCallbackWithoutIsolate,
data);
}
void Isolate::SetEmbedderHeapTracer(EmbedderHeapTracer* tracer) {
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
isolate->heap()->SetEmbedderHeapTracer(tracer);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment