diff options
author | Dara Hayes <dara.hayes@redhat.com> | 2018-10-01 19:56:07 +0100 |
---|---|---|
committer | Daniel Bevenius <daniel.bevenius@gmail.com> | 2018-10-11 08:42:49 +0200 |
commit | 8da674df493e2ded8dc812252ac4f1f90c362807 (patch) | |
tree | 5563fc15134c34aaaf123700e833325f1ff9e6ed /doc/api/vm.md | |
parent | 700fe5bbc489903578ff4d3d9da88651ae23213c (diff) | |
download | android-node-v8-8da674df493e2ded8dc812252ac4f1f90c362807.tar.gz android-node-v8-8da674df493e2ded8dc812252ac4f1f90c362807.tar.bz2 android-node-v8-8da674df493e2ded8dc812252ac4f1f90c362807.zip |
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: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Diffstat (limited to 'doc/api/vm.md')
-rw-r--r-- | doc/api/vm.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/api/vm.md b/doc/api/vm.md index 07923de585..5bf09de379 100644 --- a/doc/api/vm.md +++ b/doc/api/vm.md @@ -673,8 +673,8 @@ added: v10.10.0 data for the supplied source. * `produceCachedData` {boolean} Specifies whether to produce new cache data. **Default:** `false`. - * `parsingContext` {Object} The sandbox/context in which the said function - should be compiled in. + * `parsingContext` {Object} The [contextified][] sandbox in which the said + function should be compiled in. * `contextExtensions` {Object[]} An array containing a collection of context extensions (objects wrapping the current scope) to be applied while compiling. **Default:** `[]`. |