test: make cctest fixture use node::NewIsolate#21419
Closed
danbev wants to merge 2 commits intonodejs:masterfrom
Closed
test: make cctest fixture use node::NewIsolate#21419danbev wants to merge 2 commits intonodejs:masterfrom
danbev wants to merge 2 commits intonodejs:masterfrom
Conversation
Contributor
Author
Contributor
Author
node-test-commit-aix failure looks unrelated03:24:59 Node.js major version: -1
03:24:59 Node.js version: null
03:24:59 Running nodes
03:24:59 Triggering node-test-commit-aix » aix61-ppc64
03:55:03 Completed node-test-commit-aix » aix61-ppc64 FAILURE
03:55:03 All downstream projects complete!
03:55:03 Notifying upstream projects of job completion
03:55:03 Finished: FAILURE |
bnoordhuis
approved these changes
Jun 22, 2018
test/cctest/node_test_fixture.h
Outdated
Member
There was a problem hiding this comment.
This looks mildly questionable. Why not e.g.:
allocator = ArrayBufferUniquePtr(node::CreateArrayBufferAllocator(), &node::FreeArrayBufferAllocator);(Might need a std::move().)
Contributor
Author
There was a problem hiding this comment.
I used reset mainly to follow the pattern of the other unique_ptr's in that file but this would be much cleaner. I'll update shortly. Thanks
Contributor
Author
bnoordhuis
approved these changes
Jun 25, 2018
This commit updates the gtest fixture to use node::NewIsolate instead of creating a new V8 Isolate using v8::Isolate::New. The motivation for this is that without calling node::NewIsolate the various callbacks set on the isolate, for example AddMessageListener, SetFatalErrorHandler etc, would not get set. I don't think this is the expected behaviour and I ran into this when writing a new cctest.
934e969 to
1edab2d
Compare
Contributor
Author
Contributor
Author
danbev
added a commit
that referenced
this pull request
Jun 27, 2018
This commit updates the gtest fixture to use node::NewIsolate instead of creating a new V8 Isolate using v8::Isolate::New. The motivation for this is that without calling node::NewIsolate the various callbacks set on the isolate, for example AddMessageListener, SetFatalErrorHandler etc, would not get set. I don't think this is the expected behaviour and I ran into this when writing a new cctest. PR-URL: #21419 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
danbev
added a commit
that referenced
this pull request
Jun 27, 2018
PR-URL: #21419 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
targos
pushed a commit
that referenced
this pull request
Jun 28, 2018
This commit updates the gtest fixture to use node::NewIsolate instead of creating a new V8 Isolate using v8::Isolate::New. The motivation for this is that without calling node::NewIsolate the various callbacks set on the isolate, for example AddMessageListener, SetFatalErrorHandler etc, would not get set. I don't think this is the expected behaviour and I ran into this when writing a new cctest. PR-URL: #21419 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
targos
pushed a commit
that referenced
this pull request
Jun 28, 2018
PR-URL: #21419 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit updates the gtest fixture to use node::NewIsolate instead of
creating a new V8 Isolate using v8::Isolate::New.
The motivation for this is that without calling node::NewIsolate the
various callbacks set on the isolate, for example AddMessageListener,
SetFatalErrorHandler etc, would not get set. I don't think this is the
expected behaviour and I ran into this when writing a new cctest.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes