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: move InternalCallbackScope to StartExecution #31944

Closed
wants to merge 1 commit into from

Conversation

codebytere
Copy link
Member

@codebytere codebytere commented Feb 25, 2020

Refs #30467.

As Electron embeds Node.js, when running in ELECTRON_RUN_AS_NODE we need to mimic NodeMainInstance::Run() as much as possible. However, the externally-facing CallbackScope does not allow for skipping async hooks. As such, in order to embed properly without async hook issues we need to expose InternalCallbackScope via patch, which we would rather not do.

This PR thus moves that callback scope into StartExecution so that we can decrease our patch surface and avoid having to handle something which should reasonably be handled upstream.

cc @addaleax

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 Feb 25, 2020
Qard
Qard previously requested changes Feb 25, 2020
src/node.cc Outdated Show resolved Hide resolved
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

codebytere added a commit that referenced this pull request Feb 27, 2020
PR-URL: #31944
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Stephen Belanger <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
@codebytere
Copy link
Member Author

Landed in 18ddb1d

@codebytere codebytere closed this Feb 27, 2020
@codebytere codebytere deleted the move-cb-scope branch February 27, 2020 16:05
codebytere added a commit that referenced this pull request Feb 27, 2020
PR-URL: #31944
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Stephen Belanger <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
@codebytere codebytere mentioned this pull request Feb 29, 2020
puzpuzpuz pushed a commit to puzpuzpuz/node that referenced this pull request Apr 14, 2020
PR-URL: nodejs#31944
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Stephen Belanger <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
puzpuzpuz pushed a commit to puzpuzpuz/node that referenced this pull request Apr 14, 2020
PR-URL: nodejs#31944
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Stephen Belanger <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
targos pushed a commit to targos/node that referenced this pull request Apr 25, 2020
PR-URL: nodejs#31944
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Stephen Belanger <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
targos pushed a commit that referenced this pull request Apr 28, 2020
PR-URL: #31944
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Stephen Belanger <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
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++. 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