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 @@ -329,7 +329,7 @@ inline Environment::~Environment() {
329
329
#if HAVE_INSPECTOR
330
330
// Destroy inspector agent before erasing the context. The inspector
331
331
// destructor depends on the context still being accessible.
332
- inspector_agent_.reset (nullptr );
332
+ inspector_agent_.reset ();
333
333
#endif
334
334
335
335
context ()->SetAlignedPointerInEmbedderData (kContextEmbedderDataIndex ,
You can’t perform that action at this time.
0 commit comments