Skip to content

src: split LoadEnvironment() at startExecution() - #25320

Closed
addaleax wants to merge 2 commits into
nodejs:masterfrom
addaleax:embedder-api
Closed

src: split LoadEnvironment() at startExecution()#25320
addaleax wants to merge 2 commits into
nodejs:masterfrom
addaleax:embedder-api

Conversation

@addaleax

Copy link
Copy Markdown
Member

This makes it easier to cater to embedders which wish to skip
the startExecution() part.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

This makes it easier to cater to embedders which wish to skip
the `startExecution()` part.
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@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 Jan 2, 2019

@joyeecheungjoyeecheung 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. I wonder if as a follow up we should put the JS land startExecution into a separate file..

Comment threadsrc/node.cc Outdated
Comment threadsrc/node.cc
if (start_execution.IsEmpty()) return;
start_execution->Call(
env->context(), Undefined(env->isolate()), 0, nullptr);
env->set_start_execution_function(Local<Function>());

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.

Maybe do this before the call to, er, Call() as an extra guard against recursive invocation?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Done, but it requires some extra magic because of the way the env->...() getters work…

@addaleax

Copy link
Copy Markdown
MemberAuthor

@addaleaxaddaleax added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jan 5, 2019
@addaleax

Copy link
Copy Markdown
MemberAuthor

Landed in f6a1d88

@addaleaxaddaleax closed this Jan 6, 2019
@addaleax
addaleax deleted the embedder-api branch January 6, 2019 01:16
@kktykkty mentioned this pull request Jan 8, 2019
2 tasks
@BridgeARBridgeAR mentioned this pull request Jan 16, 2019
@MylesBorinsMylesBorins mentioned this pull request Jan 24, 2019
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs 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++.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.

10 participants

@addaleax@nodejs-github-bot@fhinkel@bnoordhuis@jasnell@cjihrig@joyeecheung@JungMinu@targos@BridgeAR