Skip to content

src: move InternalCallbackScope to StartExecution - #31944

Closed
codebytere wants to merge 1 commit into
nodejs:masterfrom
codebytere:move-cb-scope
Closed

src: move InternalCallbackScope to StartExecution#31944
codebytere wants to merge 1 commit into
nodejs:masterfrom
codebytere:move-cb-scope

Conversation

@codebytere

@codebyterecodebytere commented Feb 25, 2020

Copy link
Copy Markdown
Member

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-botnodejs-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
Comment threadsrc/node.cc Outdated
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

codebytere added a commit that referenced this pull request Feb 27, 2020
PR-URL: #31944
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
@codebytere

Copy link
Copy Markdown
MemberAuthor

Landed in 18ddb1d

@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 <anna@addaleax.net>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
@codebyterecodebytere 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 <anna@addaleax.net>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
puzpuzpuz pushed a commit to puzpuzpuz/node that referenced this pull request Apr 14, 2020
PR-URL: nodejs#31944
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
targos pushed a commit to targos/node that referenced this pull request Apr 25, 2020
PR-URL: nodejs#31944
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
targos pushed a commit that referenced this pull request Apr 28, 2020
PR-URL: #31944
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
@targostargos mentioned this pull request May 2, 2020
Sign up for freeto 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 / srcIssues 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

@codebytere@nodejs-github-bot@Qard@addaleax@joyeecheung@targos