Skip to content
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

diagnostics_channel: hasSubscribers throw TypeError: WeakRefPrototypeGet is not a function on Node 15.4.0 #36598

Closed
Lxxyx opened this issue Dec 22, 2020 · 0 comments · Fixed by #36599
Labels
diagnostics_channel Issues and PRs related to diagnostics channel

Comments

@Lxxyx
Copy link
Member

Lxxyx commented Dec 22, 2020

I was trying to improve the test coverage of diagnostics_channel and found this issue.

  • Version: 15.4.0
  • Platform: macOS 10.15.7
  • Subsystem: diagnostics_channel

What steps will reproduce the bug?

const diagnostics_channel = require('diagnostics_channel');
const dc = diagnostics_channel.channel('test');
diagnostics_channel.hasSubscribers('test');

How often does it reproduce? Is there a required condition?

Everytime.

What is the expected behavior?

No errors

What do you see instead?

node:diagnostics_channel:110
  if (ref) channel = WeakRefPrototypeGet(ref);
                     ^

TypeError: WeakRefPrototypeGet is not a function
    at Object.hasSubscribers (node:diagnostics_channel:110:22)
    at Object.<anonymous> (/tempCodeRunnerFile.javascript:3:21)
    at Module._compile (node:internal/modules/cjs/loader:1108:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
    at Module.load (node:internal/modules/cjs/loader:973:32)
    at Function.Module._load (node:internal/modules/cjs/loader:813:14)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)
    at node:internal/main/run_main_module:17:47

Additional information

I'm working on this issue. When finished I will send a Pull Request.

Lxxyx added a commit to Lxxyx/node that referenced this issue Dec 23, 2020
@Trott Trott closed this as completed in 2d40e3f Dec 24, 2020
danielleadams pushed a commit that referenced this issue Jan 12, 2021
Fixes: #36598

PR-URL: #36599
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
targos pushed a commit that referenced this issue May 1, 2021
Fixes: #36598

PR-URL: #36599
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
@Mesteery Mesteery added the diagnostics_channel Issues and PRs related to diagnostics channel label Oct 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
diagnostics_channel Issues and PRs related to diagnostics channel
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants