child_process: internal cleanup and input validation improvements
This PR is split up into three commits:
- Cleanup of the internal child_process source file. Removes some
self = this
assignments and replaces some chained array iteration functions with one simplefor
loop. - Cleanup of the
ChildProcess
test in preparation for the third commit. - Add input validation.
ChildProcess
wasn't always an official public API. When we made it official, we didn't add any input validation. It was pretty easy to pass bad input to it. Got the idea from (Refs) #12177 (closed).
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines
Affected core subsystem(s)
child_process, test