mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
84000835e2
This patch groups the preparation of main thread execution into `prepareMainThreadExecution()` and removes the cluster IPC setup in worker thread bootstrap since clusters do not use worker threads for its implementation and it's unlikely to change. PR-URL: https://github.com/nodejs/node/pull/26000 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
17 lines
538 B
JavaScript
17 lines
538 B
JavaScript
'use strict';
|
|
|
|
// User passed `-e` or `--eval` arguments to Node without `-i` or
|
|
// `--interactive`.
|
|
|
|
const {
|
|
prepareMainThreadExecution
|
|
} = require('internal/bootstrap/pre_execution');
|
|
const { evalScript } = require('internal/process/execution');
|
|
const { addBuiltinLibsToObject } = require('internal/modules/cjs/helpers');
|
|
|
|
const source = require('internal/options').getOptionValue('--eval');
|
|
prepareMainThreadExecution();
|
|
addBuiltinLibsToObject(global);
|
|
markBootstrapComplete();
|
|
evalScript('[eval]', source, process._breakFirstLine);
|