Skip to content

require("v8").setFlagsFromString('--expose_gc'); not setting --expose_gc flag #16595

@natewatson999

Description

@natewatson999
  • Version: 8.8.1
  • Platform: Win64
  • Subsystem: v8 module

There is an issue in this version of Node, where --expose_gc works as a command line option, but not when used by v8.setFlagsFromString:

When one uses this input:

$>node --expose_gc
js>typeof global.gc

The output is:

'function'

In contrast, when one uses this:

$>node
js>require("v8").setFlagsFromString('--expose_gc');
js>typeof global.gc

The output is:

undefined

The output should be 'function', since this should enable the global.gc function.

Metadata

Metadata

Assignees

No one assigned

    Labels

    v8 engineIssues and PRs related to the V8 dependency.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions