test: use v8 Default Allocator in cctest fixture#17366
test: use v8 Default Allocator in cctest fixture#17366danbev wants to merge 4 commits intonodejs:masterfrom
Conversation
This commit updates the node_test_fixture to use v8::ArrayBuffer::Allocator::NewDefaultAllocator() and removes the custom allocator.
test/cctest/node_test_fixture.h
Outdated
There was a problem hiding this comment.
I’m not sure it matters, but should we free the allocator instance at some point?
There was a problem hiding this comment.
Good point, I'll take a look and see. Thanks
test/cctest/node_test_fixture.h
Outdated
There was a problem hiding this comment.
How about using unique_ptr instead?
There was a problem hiding this comment.
Yeah, I should probably update all pointers in that file to use smart pointers. I'll update them. Thanks
bnoordhuis
left a comment
There was a problem hiding this comment.
Apropos nothing, the CreateParams instance doesn't need to be a data member, it can be stack-allocated in SetUp(). V8 doesn't use it after Isolate::New() returns.
I noticed this too but was not sure if I should change it in the PR or not. But sounds like that would be alright so I'll update it. Thanks |
bnoordhuis
left a comment
There was a problem hiding this comment.
LGTM. The CreateParams change can be a separate commit.
This commit updates the node_test_fixture to use v8::ArrayBuffer::Allocator::NewDefaultAllocator() and removes the custom allocator. PR-URL: #17366 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Timothy Gu <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
PR-URL: #17366 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Timothy Gu <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
This commit updates the node_test_fixture to use v8::ArrayBuffer::Allocator::NewDefaultAllocator() and removes the custom allocator. PR-URL: #17366 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Timothy Gu <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
PR-URL: #17366 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Timothy Gu <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
This commit updates the node_test_fixture to use v8::ArrayBuffer::Allocator::NewDefaultAllocator() and removes the custom allocator. PR-URL: #17366 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Timothy Gu <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
PR-URL: #17366 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Timothy Gu <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
This commit updates the node_test_fixture to use v8::ArrayBuffer::Allocator::NewDefaultAllocator() and removes the custom allocator. PR-URL: #17366 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Timothy Gu <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
PR-URL: #17366 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Timothy Gu <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
This commit updates the node_test_fixture to use v8::ArrayBuffer::Allocator::NewDefaultAllocator() and removes the custom allocator. PR-URL: #17366 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Timothy Gu <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
PR-URL: #17366 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Timothy Gu <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
This commit updates the node_test_fixture to use
v8::ArrayBuffer::Allocator::NewDefaultAllocator() and removes the custom
allocator.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
test