FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

src: expose DOMException to internalBinding('message') for testing by joyeecheung · Pull Request #28072 · nodejs/node · GitHub

/ node Public

src: expose DOMException to internalBinding('message') for testing - #28072

Closed
joyeecheung wants to merge 1 commit into
nodejs:masterfrom
joyeecheung:domexception
Closed

src: expose DOMException to internalBinding('message') for testing#28072
joyeecheung wants to merge 1 commit into
nodejs:masterfrom
joyeecheung:domexception

Conversation

Copy link
Copy Markdown
Member

Instead of using a hack to get it in the test.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

Copy link
Copy Markdown
Collaborator

Comment thread src/node_messaging.cc
return domexception_ctor;
}

void ThrowDataCloneException(Local<Context> context, Local<String> message) {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

@addaleax I think ideally we'd want to do this in JS instead of throwing the error in nested C++ helpers?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

@joyeecheung We need to have this in C++, because the V8 ValueSerializer API requires it. I also don’t see any reason to move the error throwing to JS?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I see, this is required by ValueSerializer::Delegate::ThrowDataCloneError - but do we need to throw errors this way ourselves? As this is just doing new DOMException(message, 'DataCloneError') - I believe in general we prefer throwing errors from JS.

Copy link
Copy Markdown
Collaborator

Comment thread src/node_messaging.cc
return domexception_ctor;
}

void ThrowDataCloneException(Local<Context> context, Local<String> message) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

@joyeecheung We need to have this in C++, because the V8 ValueSerializer API requires it. I also don’t see any reason to move the error throwing to JS?

addaleax added test Issues and PRs related to the tests. worker Issues and PRs related to Worker support. labels Jun 5, 2019

Copy link
Copy Markdown
Collaborator

Copy link
Copy Markdown
Collaborator

Copy link
Copy Markdown
Collaborator

joyeecheung added author ready PRs that have at least one approval, no outstanding review comments, and a CI started. review wanted PRs that need reviews. labels Jun 9, 2019

Copy link
Copy Markdown
Member Author

@nodejs/testing This needs one more approval to land

Trott removed the review wanted PRs that need reviews. label Jun 9, 2019

addaleax commented Jun 9, 2019

Copy link
Copy Markdown
Member

Landed in 890223d, thanks for taking care of this!

addaleax closed this Jun 9, 2019
pull Bot pushed a commit to whtiehack/node that referenced this pull request Jun 9, 2019
Instead of using a hack to get it in the test.

PR-URL: nodejs#28072
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
BridgeAR pushed a commit that referenced this pull request Jun 17, 2019
Instead of using a hack to get it in the test.

PR-URL: #28072
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
BridgeAR mentioned this pull request Jun 17, 2019
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

Labels

author ready PRs that have at least one approval, no outstanding review comments, and a CI started. test Issues and PRs related to the tests. worker Issues and PRs related to Worker support.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL