-
-
Notifications
You must be signed in to change notification settings - Fork 36.3k
diagnostics_channel: replace using with try-finally #64251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| // Flags: --no-js-explicit-resource-management | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's not add a test for an unsupported V8 flag and instead make this change as part of the lint rule (as a separate commit, but in the same PR)
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the feedback, everyone. To make sure we're aligned on the policy around V8 flags and Stage 4 syntax before I update the branch: @aduh95 — I am happy to drop test/parallel/test-diagnostics-channel-no-erm.js so we aren't adding tests for an unsupported V8 flag, and instead enforce this via a lint rule in a separate commit within this PR. @anonrig, @Renegade334 — Does pivoting from an explicit V8 flag test to a lint-rule enforcement (as suggested by @aduh95) resolve the remaining concerns here? If everyone is on board with that approach, I'll push those changes today. Otherwise, if the consensus is that Stage 4 ERM should remain unrestricted in core regardless of --no-js-explicit-resource-management, let me know and I can close this out. |
||
| 'use strict'; | ||
|
|
||
| require('../common'); | ||
| const { tracingChannel } = require('diagnostics_channel'); | ||
|
|
||
| // This test ensures that using diagnostics_channel does not cause a segfault | ||
| // when explicit resource management is disabled in V8. | ||
| // Refs: https://github.com/nodejs/node/issues/64230 | ||
|
|
||
| tracingChannel('foo').traceSync(() => {}); | ||
Uh oh!
There was an error while loading. Please reload this page.