Skip to content

src: fix node::FatalException#22654

Closed
tniessen wants to merge 1 commit into
nodejs:masterfrom
tniessen:src-fix-fatalexception
Closed

src: fix node::FatalException#22654
tniessen wants to merge 1 commit into
nodejs:masterfrom
tniessen:src-fix-fatalexception

Conversation

@tniessen

@tniessen tniessen commented Sep 2, 2018

Copy link
Copy Markdown
Member

If a fatal exception occurs before node had a chance to setup the handler in JS properly, node::FatalException crashes with

FATAL ERROR: v8::Function::Cast Could not convert to function

This fixes the function to display the JS error instead of crashing.

cc @addaleax

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

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot nodejs-github-bot added the c++ Issues and PRs that require attention from people who are familiar with C++. label Sep 2, 2018

@addaleax addaleax left a comment

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.

LGTM

Might be worth pointing out that the Get() call itself can fail and we’d currently segfault in that situation. That’s a different issue, though.

@addaleax addaleax added lib / src Issues and PRs related to general changes in the lib or src directory. fast-track PRs that do not need to wait for 72 hours to land. author ready PRs that have at least one approval, no pending requests for changes, and a CI started. labels Sep 2, 2018
@addaleax

addaleax commented Sep 2, 2018

Copy link
Copy Markdown
Member

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

This is a trivial bug fix imo, so feel free to 👍 this comment for fast-tracking.

@lundibundi lundibundi left a comment

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.

LGTM.

@addaleax

addaleax commented Sep 2, 2018

Copy link
Copy Markdown
Member

@addaleax

addaleax commented Sep 2, 2018

Copy link
Copy Markdown
Member

Landed in b797103

@addaleax addaleax closed this Sep 2, 2018
addaleax pushed a commit that referenced this pull request Sep 2, 2018
PR-URL: #22654
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
targos pushed a commit that referenced this pull request Sep 2, 2018
PR-URL: #22654
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
targos pushed a commit that referenced this pull request Sep 3, 2018
PR-URL: #22654
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
targos pushed a commit that referenced this pull request Sep 6, 2018
PR-URL: #22654
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
@tniessen tniessen removed the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Sep 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. fast-track PRs that do not need to wait for 72 hours to land. 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.

6 participants