Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4535,7 +4535,8 @@ int _StopEnv() {
context_scope = nullptr;

if (!context.IsEmpty()) {
delete *context;
// No need to delete the context value (delete *context),
// this is already done by deleting the context_scope above.
context.Clear();
}

Expand Down Expand Up @@ -4676,8 +4677,6 @@ void _StartEnv(int argc,
int v8_argc,
const char* const* v8_argv,
const bool allow_repl) {
std::cout << "Starting environment" << std::endl;

_environment->Start(argc, argv, v8_argc, v8_argv, v8_is_profiling);

const char* path = argc > 1 ? argv[1] : nullptr;
Expand Down Expand Up @@ -4755,8 +4754,9 @@ void Initialize(int argc, const char** argv, const bool allow_repl) {

int Deinitialize() {
// Empty event queue
Evaluate("process.exit();");
while (ProcessEvents()) { }
// TODO(cf): Investigate when this is really needed.
// Evaluate("process.exit();");
// while (ProcessEvents()) { }

auto exit_code = deinitialize::_StopEnv();

Expand Down