-
Notifications
You must be signed in to change notification settings - Fork 821
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
fix: allow multiple instances of core to interact with context #1387
fix: allow multiple instances of core to interact with context #1387
Conversation
Fixes #1379 |
Codecov Report
@@ Coverage Diff @@
## master #1387 +/- ##
=======================================
Coverage 94.03% 94.03%
=======================================
Files 149 149
Lines 4322 4322
Branches 880 880
=======================================
Hits 4064 4064
Misses 258 258
|
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/for
|
Because of the way node handles modules, multiple instances of
core
may exist in the same installation. For instance, core may be depended on by a propagator, a plugin, and the tracing module. If any of these depend on a slightly different version, the functions used to interact with context will fail to work together. Using Symbol.for ensures these symbols are the same regardless of the instance of core that is being used.