@@ -158,91 +158,10 @@ MaybeLocal<Object> CreateProcessObject(
158158 FIXED_ONE_BYTE_STRING (env->isolate (), " ppid" ),
159159 GetParentProcessId).FromJust ());
160160
161- // TODO(joyeecheung): the following process properties that are set using
162- // parsed CLI flags should be migrated to `internal/options` in JS land.
163-
164- // -e, --eval
165- // TODO(addaleax): Remove this.
166- if (env->options ()->has_eval_string ) {
167- READONLY_PROPERTY (process,
168- " _eval" ,
169- String::NewFromUtf8 (
170- env->isolate (),
171- env->options ()->eval_string .c_str (),
172- NewStringType::kNormal ).ToLocalChecked ());
173- }
174-
175- // -p, --print
176- // TODO(addaleax): Remove this.
177- if (env->options ()->print_eval ) {
178- READONLY_PROPERTY (process, " _print_eval" , True (env->isolate ()));
179- }
180-
181- // -c, --check
182- // TODO(addaleax): Remove this.
183- if (env->options ()->syntax_check_only ) {
184- READONLY_PROPERTY (process, " _syntax_check_only" , True (env->isolate ()));
185- }
186-
187- // -i, --interactive
188- // TODO(addaleax): Remove this.
189- if (env->options ()->force_repl ) {
190- READONLY_PROPERTY (process, " _forceRepl" , True (env->isolate ()));
191- }
192-
193- // -r, --require
194- // TODO(addaleax): Remove this.
195- const std::vector<std::string>& preload_modules =
196- env->options ()->preload_modules ;
197- if (!preload_modules.empty ()) {
198- READONLY_PROPERTY (process,
199- " _preload_modules" ,
200- ToV8Value (env->context (), preload_modules)
201- .ToLocalChecked ());
202- }
203-
204- // --no-deprecation
205- if (env->options ()->no_deprecation ) {
206- READONLY_PROPERTY (process, " noDeprecation" , True (env->isolate ()));
207- }
208-
209- // --no-warnings
210- if (env->options ()->no_warnings ) {
211- READONLY_PROPERTY (process, " noProcessWarnings" , True (env->isolate ()));
212- }
213-
214- // --trace-warnings
215- if (env->options ()->trace_warnings ) {
216- READONLY_PROPERTY (process, " traceProcessWarnings" , True (env->isolate ()));
217- }
218-
219- // --throw-deprecation
220- if (env->options ()->throw_deprecation ) {
221- READONLY_PROPERTY (process, " throwDeprecation" , True (env->isolate ()));
222- }
223-
224- // --prof-process
225- // TODO(addaleax): Remove this.
226- if (env->options ()->prof_process ) {
227- READONLY_PROPERTY (process, " profProcess" , True (env->isolate ()));
228- }
229-
230- // --trace-deprecation
231- if (env->options ()->trace_deprecation ) {
232- READONLY_PROPERTY (process, " traceDeprecation" , True (env->isolate ()));
233- }
234-
235- // --inspect-brk
236- if (env->options ()->debug_options ().wait_for_connect ()) {
237- READONLY_DONT_ENUM_PROPERTY (process,
238- " _breakFirstLine" , True (env->isolate ()));
239- }
240-
241- // --inspect-brk-node
242- if (env->options ()->debug_options ().break_node_first_line ) {
243- READONLY_DONT_ENUM_PROPERTY (process,
244- " _breakNodeFirstLine" , True (env->isolate ()));
245- }
161+ // TODO(joyeecheung): make this available in JS during pre-execution.
162+ // Note that to use this in releases the code doing the revert need to be
163+ // careful to delay the check until after the bootstrap but that may not
164+ // be possible depending on the feature being reverted.
246165
247166 // --security-revert flags
248167#define V (code, _, __ ) \
0 commit comments