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: pass along errors from object instantiations #25734

Closed
wants to merge 7 commits into from

Conversation

addaleax
Copy link
Member

Calling Function::NewInstance() can always fail in the presence of termination exceptions, so we need to check for error conditions when calling it.

This PR does not address all of those cases, but at least some of them.

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

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory. labels Jan 27, 2019
@addaleax
Copy link
Member Author

@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 Jan 29, 2019
@addaleax
Copy link
Member Author

Landed in 1a37fd6...8e6667f

@addaleax addaleax closed this Jan 29, 2019
@addaleax addaleax deleted the new-instance-1 branch January 29, 2019 19:08
addaleax added a commit that referenced this pull request Jan 29, 2019
PR-URL: #25734
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
addaleax added a commit that referenced this pull request Jan 29, 2019
PR-URL: #25734
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
addaleax added a commit that referenced this pull request Jan 29, 2019
PR-URL: #25734
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
addaleax added a commit that referenced this pull request Jan 29, 2019
PR-URL: #25734
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
addaleax added a commit that referenced this pull request Jan 29, 2019
PR-URL: #25734
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
addaleax added a commit that referenced this pull request Jan 29, 2019
PR-URL: #25734
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
addaleax added a commit that referenced this pull request Jan 29, 2019
PR-URL: #25734
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
targos pushed a commit that referenced this pull request Jan 29, 2019
PR-URL: #25734
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
targos pushed a commit that referenced this pull request Jan 29, 2019
PR-URL: #25734
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
targos pushed a commit that referenced this pull request Jan 29, 2019
PR-URL: #25734
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
targos pushed a commit that referenced this pull request Jan 29, 2019
PR-URL: #25734
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
targos pushed a commit that referenced this pull request Jan 29, 2019
PR-URL: #25734
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
targos pushed a commit that referenced this pull request Jan 29, 2019
PR-URL: #25734
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
@targos targos mentioned this pull request Jan 29, 2019
MaybeLocal<Object> Environment::CreateProcessObject(
const std::vector<std::string>& args,
const std::vector<std::string>& exec_args) {
if (*TRACE_EVENT_API_GET_CATEGORY_GROUP_ENABLED(
Copy link
Member

Choose a reason for hiding this comment

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

Why is this part inside CreateProcessObject? (Or rather why is this method named CreateProcessObject?)

Copy link
Member Author

Choose a reason for hiding this comment

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

@joyeecheung Because it’s the part that handles args and exec_args, that’s pretty much all the reason … also, I called it that because that’s what it mainly does, create + set up the process object?

addaleax added a commit to addaleax/node that referenced this pull request Jan 30, 2019
PR-URL: nodejs#25734
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
addaleax added a commit that referenced this pull request Feb 3, 2019
PR-URL: #25734
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>

PR-URL: #25837
Reviewed-By: Michaël Zasso <targos@protonmail.com>
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++. lib / src Issues and PRs related to general changes in the lib or src directory.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants