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