Skip to content

Conversation

@MSLaguana
Copy link
Contributor

node_file was casting back and forth between v8::Promise::Resolver and v8::Promise
This is unnecessary; most of the time it just wants the v8::Promise::Resolver,
converting to the v8::Promise only as a return value.

This was causing issues for node-chakracore, since the v8 shim that we use there did not have v8::Promise as pointer-convertible with v8::Promise::Resolver.

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

src

node_file was casting back and forth between v8::Resolver and v8::Promise
This is unnecessary; most of the time it just wants the v8::Resolver,
converting to the v8::Promise only as a return value.
@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. fs Issues and PRs related to the fs subsystem / file system. labels Feb 13, 2018
Copy link
Contributor

@apapirovski apapirovski left a comment

Choose a reason for hiding this comment

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

SGTM

@apapirovski apapirovski requested a review from jasnell February 13, 2018 22:04
@kfarnung
Copy link
Contributor

kfarnung commented Feb 15, 2018

@kfarnung
Copy link
Contributor

The only remaining CI failure is: nodejs/build#1126

This is unrelated to the change.

@BridgeAR BridgeAR added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Feb 16, 2018
@kfarnung
Copy link
Contributor

Landed in 197258b

@kfarnung kfarnung closed this Feb 16, 2018
kfarnung pushed a commit that referenced this pull request Feb 16, 2018
node_file was casting back and forth between v8::Resolver and
v8::Promise. This is unnecessary; most of the time it just wants the
v8::Resolver, converting to the v8::Promise only as a return value.

PR-URL: #18765
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Kyle Farnung <kfarnung@microsoft.com>
@MylesBorins
Copy link
Contributor

Should this be backported to v9.x-staging? If yes please follow the guide and raise a backport PR, if not let me know or add the dont-land-on label.

@MSLaguana MSLaguana deleted the fixFilePromiseUsage branch February 21, 2018 16:37
@MSLaguana
Copy link
Contributor Author

With the current state of v9.x-staging this change doesn't apply, but if 7154bc0#diff-fc4b9abe619d933ad78b886bab48caf3 is being backported then this change should go with it. How can I tell whether the other commit is being backported?

@MSLaguana
Copy link
Contributor Author

Ah; I see its PR lists the don't-land-on-v9.x label, so this should be the same.

MayaLekova pushed a commit to MayaLekova/node that referenced this pull request May 8, 2018
node_file was casting back and forth between v8::Resolver and
v8::Promise. This is unnecessary; most of the time it just wants the
v8::Resolver, converting to the v8::Promise only as a return value.

PR-URL: nodejs#18765
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Kyle Farnung <kfarnung@microsoft.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++. fs Issues and PRs related to the fs subsystem / file system.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants