Skip to content

node: improve invalid promiseRejectEvent message#12071

Closed
Fishrock123 wants to merge 1 commit into
nodejs:masterfrom
Fishrock123:promise-reject-event-fail-message
Closed

node: improve invalid promiseRejectEvent message#12071
Fishrock123 wants to merge 1 commit into
nodejs:masterfrom
Fishrock123:promise-reject-event-fail-message

Conversation

@Fishrock123
Copy link
Copy Markdown
Contributor

Or at least make an attempt to provide some useful information.

I don't think it possible to encounter this in practice but it could
happen in a future V8 upgrade, theoretically.

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

node? process? promise? something like that

Or at least make an attempt to provide some useful information.

I don't think it possible to encounter this in practice but it could
happen in a future V8 upgrade, theoretically.
@Fishrock123 Fishrock123 added process Issues and PRs related to the process subsystem. v8 engine Issues and PRs related to the V8 dependency. labels Mar 27, 2017
@mscdex mscdex added the promises Issues and PRs related to ECMAScript promises. label Mar 27, 2017
Copy link
Copy Markdown
Member

@jasnell jasnell left a comment

Choose a reason for hiding this comment

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

Having to do the for-in search is not ideal but if it's the only way.. LGTM

@Fishrock123
Copy link
Copy Markdown
Contributor Author

@jasnell promiseRejectEvent looks like (ids may be opposite):

{ unhandled: 1, handled: 0 }

@jasnell
Copy link
Copy Markdown
Member

jasnell commented Mar 27, 2017

😢 ... yep. Ok, LGTM

@BridgeAR
Copy link
Copy Markdown
Member

Is this actually something that could ever happen? How could a promise not be handled or unhandled?

@jasnell
Copy link
Copy Markdown
Member

jasnell commented Aug 29, 2017

@BridgeAR ... yes it can. If a rejected promise does not have a catch handler before it is garbage collected, etc

@BridgeAR
Copy link
Copy Markdown
Member

@jasnell I just checked and it is a enum with two values (check the v8::PromiseRejectEvent). This can never ever happen.

@jasnell
Copy link
Copy Markdown
Member

jasnell commented Aug 29, 2017

Interesting... ok, I'll take another look :-)

Btw... really appreciate all the triage work you've been doing the past couple of days :-)

@BridgeAR
Copy link
Copy Markdown
Member

Closing due to mentioned reason.

@BridgeAR BridgeAR closed this Aug 29, 2017
@Fishrock123 Fishrock123 deleted the promise-reject-event-fail-message branch September 19, 2017 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

process Issues and PRs related to the process subsystem. promises Issues and PRs related to ECMAScript promises. v8 engine Issues and PRs related to the V8 dependency.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants