File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Expand file tree Collapse file tree 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 {
6565template <typename Type>
6666inline void BaseObject::WeakCallback (
6767 const v8::WeakCallbackInfo<Type>& data) {
68- Type* self = data.GetParameter ();
68+ std::unique_ptr< Type> self ( data.GetParameter () );
6969 self->persistent ().Reset ();
70- delete self;
7170}
7271
7372
Original file line number Diff line number Diff line change @@ -349,7 +349,7 @@ inline Environment::~Environment() {
349349#if HAVE_INSPECTOR
350350 // Destroy inspector agent before erasing the context. The inspector
351351 // destructor depends on the context still being accessible.
352- inspector_agent_.reset (nullptr );
352+ inspector_agent_.reset ();
353353#endif
354354
355355 context ()->SetAlignedPointerInEmbedderData (kContextEmbedderDataIndex ,
You can’t perform that action at this time.
0 commit comments