fix: avoid using v8 on Isolate termination (#35766)
* fix: avoid using v8 on Isolate termination * chore: refactor for review --------- Co-authored-by: electron-patch-conflict-fixer[bot] <83340002+electron-patch-conflict-fixer[bot]@users.noreply.github.com>
This commit is contained in:
parent
8dc98aeeae
commit
478ce96914
10 changed files with 121 additions and 108 deletions
|
@ -226,7 +226,8 @@ int NodeMain(int argc, char* argv[]) {
|
|||
uint64_t env_flags = node::EnvironmentFlags::kDefaultFlags |
|
||||
node::EnvironmentFlags::kHideConsoleWindows;
|
||||
env = node::CreateEnvironment(
|
||||
isolate_data, gin_env.context(), result->args(), result->exec_args(),
|
||||
isolate_data, isolate->GetCurrentContext(), result->args(),
|
||||
result->exec_args(),
|
||||
static_cast<node::EnvironmentFlags::Flags>(env_flags));
|
||||
CHECK_NE(nullptr, env);
|
||||
|
||||
|
@ -293,7 +294,8 @@ int NodeMain(int argc, char* argv[]) {
|
|||
|
||||
node::ResetStdio();
|
||||
|
||||
node::Stop(env);
|
||||
node::Stop(env, false);
|
||||
|
||||
node::FreeEnvironment(env);
|
||||
node::FreeIsolateData(isolate_data);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue