diff options
author | Fedor Indutny <fedor@indutny.com> | 2015-10-05 23:26:13 -0400 |
---|---|---|
committer | Fedor Indutny <fedor@indutny.com> | 2015-10-06 18:57:46 -0400 |
commit | d1f24044b9b594af2fc58c8a8812035a50c53bd1 (patch) | |
tree | 2214d3148e5cd5cf740cef978ae35c4570a20cf0 /src/node_buffer.cc | |
parent | 3de353b5544ec5863dc4e1291cdf1aed01b50358 (diff) | |
download | android-node-v8-d1f24044b9b594af2fc58c8a8812035a50c53bd1.tar.gz android-node-v8-d1f24044b9b594af2fc58c8a8812035a50c53bd1.tar.bz2 android-node-v8-d1f24044b9b594af2fc58c8a8812035a50c53bd1.zip |
buffer: FreeCallback should be tied to ArrayBuffer
FreeCallback should be invoked on the storage disposal (`ArrayBuffer`),
not when the view (`Uint8Array` or `Buffer`) is disposed. This causes
bug and crashes in addons which create buffers and store only slices of
them.
PR-URL: https://github.com/nodejs/node/pull/3198
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Diffstat (limited to 'src/node_buffer.cc')
-rw-r--r-- | src/node_buffer.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/node_buffer.cc b/src/node_buffer.cc index 9dbf3f0f6e..eb727cf9c8 100644 --- a/src/node_buffer.cc +++ b/src/node_buffer.cc @@ -353,7 +353,7 @@ MaybeLocal<Object> New(Environment* env, if (!mb.FromMaybe(false)) return Local<Object>(); - CallbackInfo::New(env->isolate(), ui, callback, hint); + CallbackInfo::New(env->isolate(), ab, callback, hint); return scope.Escape(ui); } |