File tree 2 files changed +2
-3
lines changed
2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -65,9 +65,8 @@ inline Environment* BaseObject::env() const {
65
65
template <typename Type>
66
66
inline void BaseObject::WeakCallback (
67
67
const v8::WeakCallbackInfo<Type>& data) {
68
- Type* self = data.GetParameter ();
68
+ std::unique_ptr< Type> self ( data.GetParameter () );
69
69
self->persistent ().Reset ();
70
- delete self;
71
70
}
72
71
73
72
Original file line number Diff line number Diff line change @@ -328,7 +328,7 @@ inline Environment::~Environment() {
328
328
#if HAVE_INSPECTOR
329
329
// Destroy inspector agent before erasing the context. The inspector
330
330
// destructor depends on the context still being accessible.
331
- inspector_agent_.reset (nullptr );
331
+ inspector_agent_.reset ();
332
332
#endif
333
333
334
334
context ()->SetAlignedPointerInEmbedderData (kContextEmbedderDataIndex ,
You can’t perform that action at this time.
0 commit comments