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:
authorJoyee Cheung <joyeec9h3@gmail.com>2019-03-12 13:34:22 +0300
committerJoyee Cheung <joyeec9h3@gmail.com>2019-03-19 00:37:20 +0300
commita91d36fcc12c90f842d38f4a6b50809133bf1bc7 (patch)
tree0ff1ec46eeadb162af18d4d7390dd3c77e55dff8 /src/node_trace_events.cc
parente2a2f9398e30faaadf1e124844112b89322fae2e (diff)
process: set the trace category update handler during bootstrap
Set the trace category update handler during bootstrap, but delay the initial invocation of it until pre-execution. In addition, do not serialize the `node.async_hooks` category state when loading the trace_event binding during bootstrap, since it depends on run time states (e.g. CLI flags). Instead, use the `isTraceCategoryEnabled` v8 intrinsics to query that value during pre-execution. PR-URL: https://github.com/nodejs/node/pull/26605 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'src/node_trace_events.cc')
-rw-r--r--src/node_trace_events.cc10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/node_trace_events.cc b/src/node_trace_events.cc
index 5e30df41c4f..1fad37743fb 100644
--- a/src/node_trace_events.cc
+++ b/src/node_trace_events.cc
@@ -11,7 +11,6 @@
namespace node {
using v8::Array;
-using v8::Boolean;
using v8::Context;
using v8::Function;
using v8::FunctionCallbackInfo;
@@ -149,15 +148,6 @@ void NodeCategorySet::Initialize(Local<Object> target,
.FromJust();
target->Set(context, trace,
binding->Get(context, trace).ToLocalChecked()).FromJust();
-
- // Initial value of async hook trace events
- bool async_hooks_enabled = (*(TRACE_EVENT_API_GET_CATEGORY_GROUP_ENABLED(
- TRACING_CATEGORY_NODE1(async_hooks)))) != 0;
- target
- ->Set(context,
- FIXED_ONE_BYTE_STRING(env->isolate(), "asyncHooksEnabledInitial"),
- Boolean::New(env->isolate(), async_hooks_enabled))
- .FromJust();
}
} // namespace node