summaryrefslogtreecommitdiff
path: root/test/cctest/test_aliased_buffer.cc
AgeCommit message (Collapse)Author
2018-02-05test: remove destructor from node_test_fixtureDaniel Bevenius
This commit removes the destructor from node_test_fixture.h which calls the TearDown function causing TearDown to be called twice. This also allows us to remove the check of the platform_ in TearDown. Also the Setup/TearDown functions in AliasBufferTest are removed as they are not necessary. PR-URL: https://github.com/nodejs/node/pull/18524 Reviewed-By: James M Snell <jasnell@gmail.com>
2017-09-24test: fixing AliasedBuffer tests to enter IsolateMike Kaufman
AliasedBuffer tests weren't creating an v8::Isolate::Scope, and this had negative impact on the node-chakracore branch, where expectation is an Isoalte has been Enter()'d before being used. PR-URL: https://github.com/nodejs/node/pull/15536 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-09-13http2,async-wrap: introduce AliasedBuffer classMike Kaufman
This change introduces an AliasedBuffer class and updates asytnc-wrap and http2 to use this class. A common technique to optimize performance is to create a native buffer and then map that native buffer to user space via JS array. The runtime can efficiently write to the native buffer without having to route though JS, and the values being written are accessible from user space. While efficient, this technique allows modifications to user space memory w/out going through JS type system APIs, effectively bypassing any monitoring the JS VM has in place to track program state modifications. The result is that monitors have an incorrect view of prorgram state. The AliasedBuffer class provides a future placeholder where this technique can be used, but writes can still be observed. To achieve this, the node-chakra-core fork will add in appropriate tracking logic in the AliasedBuffer's SetValue() method. Going forward, this class can evolve to support more sophisticated mechanisms if necessary. PR-URL: https://github.com/nodejs/node/pull/15077 Reviewed-By: Trevor Norris <trev.norris@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>