-
Notifications
You must be signed in to change notification settings - Fork 97
ci: add macos to CI #63
Conversation
test/parallel/test-v8-serdes.js
Outdated
@@ -63,7 +65,7 @@ const deserializerTypeError = | |||
{ | |||
const ser = new v8.DefaultSerializer(); | |||
ser._writeHostObject = common.mustCall((object) => { | |||
assert.strictEqual(object, process.stdin._handle); | |||
assert.strictEqual(object, hostObject); | |||
const buf = Buffer.from('stdin'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Curiosity / context question]: I assume that in the context of this test, "stdin"
is meant to be just a random string constant. Would it be less confusing to change it to something like "hostObjectTag"
or similar after this change? Or are you trying to keep the churn minimal?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I just did search/replace, that’s all. ;) Thanks for catching is, updated!
If `stdin` was closed or referred to a file, this didn't work, because it was accessed via file descriptor. Instead, use another generic native object.
@@ -20,6 +20,8 @@ const objects = [ | |||
circular | |||
]; | |||
|
|||
const hostObject = new (process.binding('js_stream').JSStream)(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 I thought this exploded last time I tried it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean, constructing a JSStream
like that? It seems to work fine to me
If `stdin` was closed or referred to a file, this didn't work, because it was accessed via file descriptor. Instead, use another generic native object. PR-URL: #63 Reviewed-By: Jan Krems <jan.krems@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
PR-URL: #63 Reviewed-By: Jan Krems <jan.krems@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
If `stdin` was closed or referred to a file, this didn't work, because it was accessed via file descriptor. Instead, use another generic native object. cherry-picked from ayojs/ayo#63
If `stdin` was closed or referred to a file, this didn't work, because it was accessed via file descriptor. Instead, use another generic native object. cherry-picked from ayojs/ayo#63 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
If `stdin` was closed or referred to a file, this didn't work, because it was accessed via file descriptor. Instead, use another generic native object. cherry-picked from ayojs/ayo#63 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
ci