Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
src: expose MaybeInitializeContext to allow existing contexts #28544
Splits the node.js specific tweak intialization of NewContext into a new helper MaybeInitializeContext so that embedders with existing contexts can still use them in a node Environment now that primordials are initialized and required so early.
Found this issue while upgrading Electron to node 12.4, now primordials are created in every context --> electron/node@3da36d0 we need to initialize a context the same way node does but we don't create the context so this method had to be split into two to allow folks with pre-created contexts to still use them in node Environments
Sorry @BridgeAR had PTO last week
I ended up with a slightly different approach here, I realized that