Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/node_buffer.cc')
-rw-r--r--src/node_buffer.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/node_buffer.cc b/src/node_buffer.cc
index a2e6ec27f82..77120d6af4a 100644
--- a/src/node_buffer.cc
+++ b/src/node_buffer.cc
@@ -163,7 +163,6 @@ void CallbackInfo::WeakCallback(
const WeakCallbackInfo<CallbackInfo>& data) {
CallbackInfo* self = data.GetParameter();
self->WeakCallback(data.GetIsolate());
- delete self;
}
@@ -171,6 +170,7 @@ void CallbackInfo::WeakCallback(Isolate* isolate) {
callback_(data_, hint_);
int64_t change_in_bytes = -static_cast<int64_t>(sizeof(*this));
isolate->AdjustAmountOfExternalAllocatedMemory(change_in_bytes);
+ delete this;
}