Commit 94723c19 authored by Michael Lippautz's avatar Michael Lippautz Committed by Commit Bot

api: Remove deprecated TracedReference::SetFinalizationCallback method

TracedReference is supposed to be as light-weight as possible without
destructor or other callbacks, essentially just representing a plain managed
reference.

Change-Id: Iae52cf7460e3623f1fb7d183757ecd39b2431369
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2033173
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66106}
parent aa3aaa76
......@@ -1128,17 +1128,11 @@ class TracedReference : public TracedReferenceBase<T> {
/**
* Copy assignment operator initializing TracedGlobal from an existing one.
*
* Note: Prohibited when |other| has a finalization callback set through
* |SetFinalizationCallback|.
*/
V8_INLINE TracedReference& operator=(const TracedReference& rhs);
/**
* Copy assignment operator initializing TracedGlobal from an existing one.
*
* Note: Prohibited when |other| has a finalization callback set through
* |SetFinalizationCallback|.
*/
template <class S>
V8_INLINE TracedReference& operator=(const TracedReference<S>& rhs);
......@@ -1155,20 +1149,6 @@ class TracedReference : public TracedReferenceBase<T> {
return reinterpret_cast<TracedReference<S>&>(
const_cast<TracedReference<T>&>(*this));
}
/**
* Adds a finalization callback to the handle. The type of this callback is
* similar to WeakCallbackType::kInternalFields, i.e., it will pass the
* parameter and the first two internal fields of the object.
*
* The callback is then supposed to reset the handle in the callback. No
* further V8 API may be called in this callback. In case additional work
* involving V8 needs to be done, a second callback can be scheduled using
* WeakCallbackInfo<void>::SetSecondPassCallback.
*/
V8_DEPRECATED("Use TracedGlobal<> if callbacks are required.")
V8_INLINE void SetFinalizationCallback(
void* parameter, WeakCallbackInfo<void>::Callback callback);
};
/**
......@@ -10944,13 +10924,6 @@ void TracedGlobal<T>::SetFinalizationCallback(
reinterpret_cast<internal::Address*>(this->val_), parameter, callback);
}
template <class T>
void TracedReference<T>::SetFinalizationCallback(
void* parameter, typename WeakCallbackInfo<void>::Callback callback) {
V8::SetFinalizationCallbackTraced(
reinterpret_cast<internal::Address*>(this->val_), parameter, callback);
}
template <typename T>
ReturnValue<T>::ReturnValue(internal::Address* slot) : value_(slot) {}
......
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