Skip to content
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

src: simplify MessagePort construction code a bit #23036

Closed
wants to merge 1 commit into from

Conversation

addaleax
Copy link
Member

@addaleax addaleax commented Sep 23, 2018

Using ASSIGN_OR_RETURN_UNWRAP would return if the
created MessagePort object had no internal fields.
That would be a bug, so switch to a checked conversion instead.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

@nodejs-github-bot nodejs-github-bot added the c++ Issues and PRs that require attention from people who are familiar with C++. label Sep 23, 2018
@addaleax addaleax added the worker Issues and PRs related to Worker support. label Sep 23, 2018
@addaleax
Copy link
Member Author

addaleax commented Sep 23, 2018

CI: https://ci.nodejs.org/job/node-test-pull-request/17383/

(Only edited the commit message since CI was started)

Using `ASSIGN_OR_RETURN_UNWRAP` would return if the
created `MessagePort` object had no internal fields.
That would be a bug, so switch to a checked conversion instead.
@addaleax
Copy link
Member Author

@addaleax addaleax added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Sep 23, 2018
@addaleax
Copy link
Member Author

Landed in d102a85

@addaleax addaleax closed this Sep 25, 2018
@addaleax addaleax deleted the message-port-checked branch September 25, 2018 22:31
addaleax added a commit that referenced this pull request Sep 25, 2018
Using `ASSIGN_OR_RETURN_UNWRAP` would return if the
created `MessagePort` object had no internal fields.
That would be a bug, so switch to a checked conversion instead.

PR-URL: #23036
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
targos pushed a commit that referenced this pull request Sep 27, 2018
Using `ASSIGN_OR_RETURN_UNWRAP` would return if the
created `MessagePort` object had no internal fields.
That would be a bug, so switch to a checked conversion instead.

PR-URL: #23036
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. c++ Issues and PRs that require attention from people who are familiar with C++. worker Issues and PRs related to Worker support.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants