-
Notifications
You must be signed in to change notification settings - Fork 31.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
worker: reduce MessagePort
prototype to documented API
#23037
Changes from 4 commits
11b5060
b327b9b
7551a04
fb840e7
255db77
e2e2d67
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,3 +69,12 @@ const { MessageChannel, MessagePort } = require('worker_threads'); | |
}); | ||
}); | ||
} | ||
|
||
{ | ||
assert.deepStrictEqual( | ||
Object.getOwnPropertyNames(MessagePort.prototype).sort(), | ||
[ | ||
'ref', 'unref', 'start', 'close', 'postMessage', 'onmessage', | ||
'constructor' | ||
].sort()); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: why should the array not be pre-sorted as in: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Laziness? ;) Fixed! |
||
} |
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.
Nit: this triggers my OCD, can we make this consistent with the above destructuring assignment?
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.
Sorry, this was leftover from addressing the previous review comment … the comma is gone now :)
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.
Thank you.