[wip] src, inspector: support opted-in VM contexts
Works, doesn't crash, but no tests or docs at this moment.
V8's console is injected unconditionally upon every attachContext
call, which may be not desirable.
Uses an approach inspired by @jgoz in https://github.com/nodejs/node/issues/7593#issuecomment-310128400.
/cc @eugeneo @bmeck
Fixes: nodejs#7593 Refs: nodejs#9272
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines
Affected core subsystem(s)
inspector