Skip to content

Commit

Permalink
src: ensure V8 initialized before marking milestone
Browse files Browse the repository at this point in the history
PR-URL: #40405
Refs: electron/electron#31349
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
  • Loading branch information
codebytere authored and targos committed Nov 4, 2021
1 parent 618bbbf commit ff3b7d2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/env.cc
Original file line number Diff line number Diff line change
Expand Up @@ -458,8 +458,11 @@ void Environment::InitializeMainContext(Local<Context> context,
environment_start_time_);
performance_state_->Mark(performance::NODE_PERFORMANCE_MILESTONE_NODE_START,
per_process::node_start_time);
performance_state_->Mark(performance::NODE_PERFORMANCE_MILESTONE_V8_START,
performance::performance_v8_start);

if (per_process::v8_initialized) {
performance_state_->Mark(performance::NODE_PERFORMANCE_MILESTONE_V8_START,
performance::performance_v8_start);
}
}

Environment::~Environment() {
Expand Down

0 comments on commit ff3b7d2

Please sign in to comment.