mirror of
https://github.com/nodejs/node.git
synced 2025-04-28 13:40:37 +00:00
src: fix EnvironmentOptions.async_context_frame default value
Some checks are pending
Coverage Linux (without intl) / coverage-linux-without-intl (push) Waiting to run
Coverage Linux / coverage-linux (push) Waiting to run
Coverage Windows / coverage-windows (push) Waiting to run
Test and upload documentation to artifacts / build-docs (push) Waiting to run
Linters / lint-addon-docs (push) Waiting to run
Linters / lint-cpp (push) Waiting to run
Linters / format-cpp (push) Waiting to run
Linters / lint-js-and-md (push) Waiting to run
Linters / lint-py (push) Waiting to run
Linters / lint-yaml (push) Waiting to run
Linters / lint-sh (push) Waiting to run
Linters / lint-codeowners (push) Waiting to run
Linters / lint-pr-url (push) Waiting to run
Linters / lint-readme (push) Waiting to run
Notify on Push / Notify on Force Push on `main` (push) Waiting to run
Notify on Push / Notify on Push on `main` that lacks metadata (push) Waiting to run
Scorecard supply-chain security / Scorecard analysis (push) Waiting to run
Some checks are pending
Coverage Linux (without intl) / coverage-linux-without-intl (push) Waiting to run
Coverage Linux / coverage-linux (push) Waiting to run
Coverage Windows / coverage-windows (push) Waiting to run
Test and upload documentation to artifacts / build-docs (push) Waiting to run
Linters / lint-addon-docs (push) Waiting to run
Linters / lint-cpp (push) Waiting to run
Linters / format-cpp (push) Waiting to run
Linters / lint-js-and-md (push) Waiting to run
Linters / lint-py (push) Waiting to run
Linters / lint-yaml (push) Waiting to run
Linters / lint-sh (push) Waiting to run
Linters / lint-codeowners (push) Waiting to run
Linters / lint-pr-url (push) Waiting to run
Linters / lint-readme (push) Waiting to run
Notify on Push / Notify on Force Push on `main` (push) Waiting to run
Notify on Push / Notify on Push on `main` that lacks metadata (push) Waiting to run
Scorecard supply-chain security / Scorecard analysis (push) Waiting to run
`default_is_true` in bool OptionsParser is a hint for help text. The default value for an option is still required to be set in the option struct. PR-URL: https://github.com/nodejs/node/pull/58030 Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
This commit is contained in:
parent
8e7ae60e3b
commit
6cd1c09c10
@ -146,7 +146,7 @@ class EnvironmentOptions : public Options {
|
||||
bool allow_worker_threads = false;
|
||||
bool experimental_repl_await = true;
|
||||
bool experimental_vm_modules = false;
|
||||
bool async_context_frame = false;
|
||||
bool async_context_frame = true;
|
||||
bool expose_internals = false;
|
||||
bool force_node_api_uncaught_exceptions_policy = false;
|
||||
bool frozen_intrinsics = false;
|
||||
@ -408,6 +408,10 @@ class OptionsParser {
|
||||
// These methods add a single option to the parser. Optionally, it can be
|
||||
// specified whether the option should be allowed from environment variable
|
||||
// sources (i.e. NODE_OPTIONS).
|
||||
|
||||
// default_is_true is only a hint in printing help text, it does not
|
||||
// affect the default value of the option. Set the default value in the
|
||||
// Options struct instead.
|
||||
void AddOption(const char* name,
|
||||
const char* help_text,
|
||||
bool Options::*field,
|
||||
|
@ -0,0 +1,9 @@
|
||||
// Flags: --expose-internals --no-async-context-frame
|
||||
'use strict';
|
||||
|
||||
require('../common');
|
||||
const assert = require('assert');
|
||||
const AsyncContextFrame = require('internal/async_context_frame');
|
||||
|
||||
// Test that AsyncContextFrame can be disabled.
|
||||
assert(!AsyncContextFrame.enabled);
|
@ -0,0 +1,9 @@
|
||||
// Flags: --expose-internals
|
||||
'use strict';
|
||||
|
||||
require('../common');
|
||||
const assert = require('assert');
|
||||
const AsyncContextFrame = require('internal/async_context_frame');
|
||||
|
||||
// Test that AsyncContextFrame is enabled by default.
|
||||
assert(AsyncContextFrame.enabled);
|
Loading…
Reference in New Issue
Block a user