chore: simplify WrappableBase::SecondWeakCallback (#29359)
This commit is contained in:
parent
9bb7051f54
commit
d80e36bcdb
1 changed files with 1 additions and 3 deletions
|
@ -74,9 +74,7 @@ void WrappableBase::FirstWeakCallback(
|
|||
// static
|
||||
void WrappableBase::SecondWeakCallback(
|
||||
const v8::WeakCallbackInfo<WrappableBase>& data) {
|
||||
auto* wrappable = static_cast<WrappableBase*>(data.GetInternalField(0));
|
||||
if (wrappable)
|
||||
delete wrappable;
|
||||
delete static_cast<WrappableBase*>(data.GetInternalField(0));
|
||||
}
|
||||
|
||||
namespace internal {
|
||||
|
|
Loading…
Reference in a new issue