Skip to content

lib: fix emit warning for debuglog.time when disabled#54275

Merged
nodejs-github-bot merged 5 commits intonodejs:mainfrom
H4ad:fix-gh-54265
Aug 27, 2024
Merged

lib: fix emit warning for debuglog.time when disabled#54275
nodejs-github-bot merged 5 commits intonodejs:mainfrom
H4ad:fix-gh-54265

Conversation

@H4ad
Copy link
Member

@H4ad H4ad commented Aug 8, 2024

Fixes #54265

The code of debuglog.time was executing because the internal flag timerFlags had the value 7 and the comparison was wrong, instead of checking if the enum flags were activated (2 | 4), I was just making a === comparison.

Now this behavior is fixed by just doing the comparison correctly, I also added a test to track this regression.

In theory, this bug slowed down a little bit all the requires but not too much since the heavy part was skipped.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. dont-land-on-v20.x PRs that should not land on the v20.x-staging branch and should not be released in v20.x. needs-ci PRs that need a full CI run. util Issues and PRs related to the built-in util module.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unactionable "Label ... already exists for debuglog.time" warning since Node.js 22.6

6 participants