GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — src: fix EnvironmentOptions.async_context_frame default value · nodejs/node@902cbe6

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src
    • node_options.h
  • test/parallel
    • test-internal-async-context-frame-disable.js
    • test-internal-async-context-frame-enabled.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/node_options.h‎

Copy file name to clipboardExpand all lines: src/node_options.h
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ class EnvironmentOptions : public Options {
146146
bool allow_worker_threads = false;
147147
bool experimental_repl_await = true;
148148
bool experimental_vm_modules = false;
149-
bool async_context_frame = false;
149+
bool async_context_frame = true;
150150
bool expose_internals = false;
151151
bool force_node_api_uncaught_exceptions_policy = false;
152152
bool frozen_intrinsics = false;
@@ -408,6 +408,10 @@ class OptionsParser {
408408
// These methods add a single option to the parser. Optionally, it can be
409409
// specified whether the option should be allowed from environment variable
410410
// sources (i.e. NODE_OPTIONS).
411+
412+
// default_is_true is only a hint in printing help text, it does not
413+
// affect the default value of the option. Set the default value in the
414+
// Options struct instead.
411415
void AddOption(const char* name,
412416
const char* help_text,
413417
bool Options::*field,
Collapse file

‎test/parallel/test-internal-async-context-frame-disable.js‎

Copy file name to clipboard
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// Flags: --expose-internals --no-async-context-frame
2+
'use strict';
3+
4+
require('../common');
5+
const assert = require('assert');
6+
const AsyncContextFrame = require('internal/async_context_frame');
7+
8+
// Test that AsyncContextFrame can be disabled.
9+
assert(!AsyncContextFrame.enabled);
Collapse file

‎test/parallel/test-internal-async-context-frame-enabled.js‎

Copy file name to clipboard
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// Flags: --expose-internals
2+
'use strict';
3+
4+
require('../common');
5+
const assert = require('assert');
6+
const AsyncContextFrame = require('internal/async_context_frame');
7+
8+
// Test that AsyncContextFrame is enabled by default.
9+
assert(AsyncContextFrame.enabled);

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.