diff --git a/doc/api/diagnostics_channel.md b/doc/api/diagnostics_channel.md index 019fe9a6614b9d..8f62cd3c632e81 100644 --- a/doc/api/diagnostics_channel.md +++ b/doc/api/diagnostics_channel.md @@ -409,6 +409,12 @@ channel.unsubscribe(onMessage); ### Built-in Channels +> Stability: 1 - Experimental + +While the diagnostics\_channel API is now considered stable, the built-in +channels currently available are not. Each channel must be declared stable +independently. + #### HTTP `http.client.request.start` diff --git a/src/node_contextify.cc b/src/node_contextify.cc index 45c5b33b634a22..d9036cb56ad2b2 100644 --- a/src/node_contextify.cc +++ b/src/node_contextify.cc @@ -1407,6 +1407,17 @@ void Initialize(Local target, READONLY_PROPERTY(constants, "measureMemory", measure_memory); + Local loop_mode = Object::New(env->isolate()); + { + uv_run_mode DEFAULT = UV_RUN_DEFAULT; + uv_run_mode ONCE = UV_RUN_ONCE; + uv_run_mode NOWAIT = UV_RUN_NOWAIT; + NODE_DEFINE_CONSTANT(loop_mode, DEFAULT); + NODE_DEFINE_CONSTANT(loop_mode, ONCE); + NODE_DEFINE_CONSTANT(loop_mode, NOWAIT); + READONLY_PROPERTY(constants, "loopMode", loop_mode); + } + target->Set(context, env->constants_string(), constants).Check(); SetMethod(context, target, "measureMemory", MeasureMemory);