Uh oh!
There was an error while loading. Please reload this page.
buffer: FreeCallback should be tied to ArrayBuffer - #3198
Conversation
indutny
commented
Oct 6, 2015
@bnoordhuis I wonder if it may be a good opportunity to write our first C++ test. |
21c3543 to
1ce1e17Compareindutny
commented
Oct 6, 2015
Nah, gtest didn't work out. It was simpler to just write an test addon. |
There was a problem hiding this comment.
Out of curiosity, is it viable to use a technique similar to https://groups.google.com/d/msg/v8-users/JmhzmswiqvM/IC6UtV5FEC4J so that --expose-gc doesn't have to be passed?
There was a problem hiding this comment.
idk, seems to be a legit use of RequestGC here
trevnorris
commented
Oct 6, 2015
LGTM. Does CI run these tests? |
There was a problem hiding this comment.
Can I suggest you make this a counter and check that it's > 0 in FreeCallback?
bnoordhuis
commented
Oct 6, 2015
LGTM |
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: nodejs#3198 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
1ce1e17 to
9d4063eCompareindutny
commented
Oct 6, 2015
All fixed and rebased. Running CI. |
indutny
commented
Oct 6, 2015
indutny
commented
Oct 6, 2015
Landed in d1f2404, please backport to v4.x |
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: #3198 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
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: #3198 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
MylesBorins
commented
Nov 17, 2015
landed in v4.x-staging in 660f759 |
FreeCallback should be invoked on the storage disposal (
ArrayBuffer),not when the view (
Uint8ArrayorBuffer) is disposed. This causesbug and crashes in addons which create buffers and store only slices of
them.
cc @trevnorris@bnoordhuis @nodejs/collaborators