Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShelley Vohr <shelley.vohr@gmail.com>2021-10-11 13:49:40 +0300
committerShelley Vohr <shelley.vohr@gmail.com>2021-10-15 17:49:37 +0300
commitad4e70c817117616fee00152da2b4b8c9f8c147a (patch)
tree5fe28eb38b7b182c089d2ca23ddac48b8faf5254 /src/env.cc
parent881174e016d6c27b20c70111e6eae2296b6c6293 (diff)
src: ensure V8 initialized before marking milestone
PR-URL: https://github.com/nodejs/node/pull/40405 Refs: https://github.com/electron/electron/pull/31349 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Diffstat (limited to 'src/env.cc')
-rw-r--r--src/env.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/env.cc b/src/env.cc
index 1cc7da1ce15..2cb2dccdf32 100644
--- a/src/env.cc
+++ b/src/env.cc
@@ -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() {