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: CancelTerminateExecution before throwing errors #20146

Closed
wants to merge 1 commit into from

Conversation

joyeecheung
Copy link
Member

Terminating the execution of a script would create a pending
exception, therefore we should cancel the termination
before throwing a new exception, otherwise the attempt to
create a custom error may fail.

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

Terminating the execution of a script would create a pending
exception, therefore we should cancel the termination
*before* throwing a new exception, otherwise the attempt to
create a custom error may fail.
@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. vm Issues and PRs related to the vm subsystem. labels Apr 19, 2018
@joyeecheung
Copy link
Member Author

@joyeecheung
Copy link
Member Author

cc @addaleax @bnoordhuis

Copy link
Member

@bnoordhuis bnoordhuis left a comment

Choose a reason for hiding this comment

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

LGTM. Shame of the duplication.

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

LGTM. Shame of the duplication.

@bnoordhuis Yeah, the CJS and ESM code could use some proper reuse there..

On a side note, maybe the ESM error would have been "Module evaluation timed out" or "Module evaluation was interrupted", but I doubt if that matters for end users

@joyeecheung
Copy link
Member Author

Landed in 3eeb346, thanks

joyeecheung added a commit that referenced this pull request Apr 22, 2018
Terminating the execution of a script would create a pending
exception, therefore we should cancel the termination
*before* throwing a new exception, otherwise the attempt to
create a custom error may fail.

PR-URL: #20146
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
jasnell pushed a commit that referenced this pull request Apr 23, 2018
Terminating the execution of a script would create a pending
exception, therefore we should cancel the termination
*before* throwing a new exception, otherwise the attempt to
create a custom error may fail.

PR-URL: #20146
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[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++. vm Issues and PRs related to the vm subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants