Commit 8da674df authored by Dara Hayes's avatar Dara Hayes Committed by Daniel Bevenius
Browse files

vm: pass parsing_context to ScriptCompiler::CompileFunctionInContext

ContextifyContext::CompileFunction in src/node_contextify.cc
was incorrectly passing the context variable to
ScriptCompiler::CompileFunctionInContext

This meant that the parsingContext option in vm.compileFunction
was not being applied properly to the compiled function.

fixes: https://github.com/nodejs/node/issues/23194

doc: clarify parsingContext option for vm.compileScript

test: usage of parsingContext in vm.compileFunction

PR-URL: https://github.com/nodejs/node/pull/23206
Fixes: https://github.com/nodejs/node/issues/23194


Reviewed-By: default avatarUjjwal Sharma <usharma1998@gmail.com>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarSakthipriyan Vairamani <thechargingvolcano@gmail.com>
parent 700fe5bb
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment