Skip to content

Commit

Permalink
deps: V8: cherry-pick 94723c197199
Browse files Browse the repository at this point in the history
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 <[email protected]>
    Reviewed-by: Ulan Degenbaev <[email protected]>
    Commit-Queue: Michael Lippautz <[email protected]>
    Cr-Commit-Position: refs/heads/master@{#66106}

Refs: v8/v8@94723c1

PR-URL: #32885
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Ujjwal Sharma <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
Reviewed-By: Beth Griggs <[email protected]>
  • Loading branch information
addaleax authored and BethGriggs committed Apr 20, 2020
1 parent 4a11a54 commit 07d4372
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 28 deletions.
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

0 comments on commit 07d4372

Please sign in to comment.