src: expose LookupAndCompile with parameters#45142
Closed
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #44018.
This PR exposes a version of
LookupAndCompilethat takes parameters instead of detecting them based on module IDs.Electron currently maintains a wrapper to
LookupAndCompile, which specifically requires parameters because we pass our own modules toLookupAndCompilein several places:shell/common/api/electron_api_asar.ccshell/renderer/electron_sandboxed_renderer_client.ccshell/renderer/renderer_client_base.ccand therefore need to be able to able to expose the ability to set that.
I do, however, see that Node.js recently added back a version of
CompileAndCallwhich is effectively the same as our ownCompileAndCallwrapper, so if it would be better to modify that to allow parameters I would also be happy to take that path.