fix: add native function to create preload script (#13032)
* add native function to create preload script * add tests * fix formatting * fix tests * rerun CI
This commit is contained in:
parent
e922b1733b
commit
ffc15e02a6
4 changed files with 36 additions and 4 deletions
|
@ -112,10 +112,8 @@ if (preloadSrc) {
|
|||
${preloadSrc}
|
||||
})`
|
||||
|
||||
// eval in window scope:
|
||||
// http://www.ecma-international.org/ecma-262/5.1/#sec-10.4.2
|
||||
const geval = eval
|
||||
const preloadFn = geval(preloadWrapperSrc)
|
||||
// eval in window scope
|
||||
const preloadFn = binding.createPreloadScript(preloadWrapperSrc)
|
||||
const {setImmediate, clearImmediate} = require('timers')
|
||||
preloadFn(preloadRequire, preloadProcess, Buffer, global, setImmediate, clearImmediate)
|
||||
} else if (preloadError) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue