From 8da674df493e2ded8dc812252ac4f1f90c362807 Mon Sep 17 00:00:00 2001 From: Dara Hayes Date: Mon, 1 Oct 2018 19:56:07 +0100 Subject: 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 Reviewed-By: James M Snell Reviewed-By: Sakthipriyan Vairamani --- doc/api/vm.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc/api/vm.md') 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:** `[]`. -- cgit v1.2.3