Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
deps: V8: cherry-pick 94723c197199
Original commit message:

    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: Ulan Degenbaev <ulan@chromium.org>
    Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#66106}

Refs: v8/v8@94723c1
  • Loading branch information
addaleax authored and targos committed Apr 18, 2020
commit 5ad3b54b24b1f7bd03e902fc6126941f12ef6ab8
2 changes: 1 addition & 1 deletion common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

# Reset this number to 0 on major V8 upgrades.
# Increment by one for each non-official patch applied to deps/v8.
'v8_embedder_string': '-node.15',
'v8_embedder_string': '-node.16',

##### V8 defaults for Node.js #####

Expand Down
27 changes: 0 additions & 27 deletions deps/v8/include/v8.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
};

/**
Expand Down Expand Up @@ -10953,13 +10933,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) {}

Expand Down