profile
viewpoint
Eugene Ostroukhov eugeneo Netflix Los Gatos Node.js fan and a contributor. Extensive experience in devtools, including Node inspector implementation.

GoogleChromeLabs/ndb 9848

ndb is an improved debugging experience for Node.js, enabled by Chrome DevTools

eugeneo/node-targets-discovery 1

Sample module that allows debugging Node.js instances as subtargets

eugeneo/node 0

Node.js JavaScript runtime :sparkles::turtle::rocket::sparkles:

eugeneo/nodejs.org 0

The Node.js website.

eugeneo/server-in-worker 0

Experiments on running HTTP server in Node worker thread

pavelfeldman/wtf 0

Blink WTF

issue commentnodejs/node

Inspector segmentation fault

Suspicios line in stack trace: #11 0x0000000002ea0e27 in v8_inspector::protocol::UberDispatcher::dispatch (this=0x720c500, callId=17, in_method=..., parsedMessage=Python Exception <class 'TypeError'> expected string or bytes-like object: ..., rawMessage=...) at /home/sqrt/src/node/out/Debug/obj/gen/inspector-generated-output-root/src/inspector/protocol/Protocol.cpp:1136

Hakerh400

comment created time in a month

pull request commentnodejs/node

inspector: add --inspect-allow-host option

My main concern is that this increases the attack surface. Is the SSH tunnel (as described on this page - https://nodejs.org/de/docs/guides/debugging-getting-started/) not enough?

legendecas

comment created time in 2 months

pull request commentnodejs/node

fix(worker): allow inspector.close() inside Worker

Inspector.close stops global inspector server. It should not be available in the worker.

oyyd

comment created time in 3 months

PR closed nodejs/node

Reviewers
inspector: allow whitelisting inspector domain C++ inspector lib / src stalled

This change introduces an "--inspector-domain-whitelist" that can be used to provide a comma-separated list of enabled Inspector domains. This will allow to limit exposure of the Node instances to applications that may connect to the inspector socket. E.g. this allows hiding unsafe methods like "Runtime.evaluate" that allow executing arbitrary code.

  1. Runtime.runIfWaitingForDebugger will always be available. This is essential for tools that rely on --inspect-brk flag to connect before the code execution starts.
  2. All domains are still available through the Inspector JS APIs.

<!-- Thank you for your pull request. Please provide a description above and review the requirements below.

Bug fixes and new features should include tests and possibly benchmarks.

Contributors guide: https://github.com/nodejs/node/blob/master/CONTRIBUTING.md -->

Checklist

<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

  • [x] make -j4 test (UNIX), or vcbuild test (Windows) passes
  • [x] tests and/or benchmarks are included
  • [ ] documentation is changed or added
  • [x] commit message follows commit guidelines
+147 -19

7 comments

11 changed files

eugeneo

pr closed time in 4 months

pull request commentnodejs/node

inspector: allow whitelisting inspector domain

I think it is safe to assume there is no longer an interest in this change.

eugeneo

comment created time in 4 months

Pull request review commentnodejs/node

inspector: turn platform tasks that outlive Agent into no-ops

 void MainThreadInterface::Post(std::unique_ptr<Request> request) {   if (needs_notify) {     if (isolate_ != nullptr && platform_ != nullptr) {       std::shared_ptr<v8::TaskRunner> taskrunner =-        platform_->GetForegroundTaskRunner(isolate_);-      taskrunner->PostTask(std::make_unique<DispatchMessagesTask>(this));-      isolate_->RequestInterrupt([](v8::Isolate* isolate, void* thread) {-        static_cast<MainThreadInterface*>(thread)->DispatchMessages();-      }, this);+          platform_->GetForegroundTaskRunner(isolate_);+      std::weak_ptr<MainThreadInterface>* interface_ptr =+          new std::weak_ptr<MainThreadInterface>(shared_from_this());+      taskrunner->PostTask(+          std::make_unique<DispatchMessagesTask>(*interface_ptr));+      isolate_->RequestInterrupt([](v8::Isolate* isolate, void* opaque) {+        std::unique_ptr<std::weak_ptr<MainThreadInterface>> interface_ptr {+          static_cast<std::weak_ptr<MainThreadInterface>*>(opaque) };+        std::shared_ptr<MainThreadInterface> interface = interface_ptr->lock();

AFAIR, VC++ does not allow interface as an identifier.

addaleax

comment created time in 4 months

pull request commentnodejs/node

inspector: turn platform tasks that outlive Agent into no-ops

I’m reviewing from the phone so I am not sure if I captured the details of the change. It looks like this is the scenario where MainThreadHeandle is supposed to be used... I will try to do a better review this weekend.

addaleax

comment created time in 4 months

pull request commentdenoland/deno

Basic inspector support

I am not sure if this is applicable here, but there were similar concerns about a thread in Node - and we ended up having that “always on” thread anyways. In the Node that thread is handling a signal used to enable Inspector on a running instance if the Inspector was not enabled from the command line.

On Fri, Oct 4, 2019 at 5:56 PM Ryan Dahl notifications@github.com wrote:

@ry requested changes on this pull request.

Bert discovered a problem - there's a debugger thread that's running unconditionally (even when --debug isn't running). This is causing a little failure in tests/workers_startup_bench.ts but it's indicative of a bigger design problem. Fix isn't super easy - so this will take a bit more to land

  • and I should have been reviewing more carefully : )

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/denoland/deno/pull/2991?email_source=notifications&email_token=AACGJLML7O3BDI3JLBG4DZLQM7Q4VA5CNFSM4IYRSU4KYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCG7Y5AI#pullrequestreview-297766529, or mute the thread https://github.com/notifications/unsubscribe-auth/AACGJLP7YJRFYMUHZ65NO5DQM7Q4VANCNFSM4IYRSU4A .

piscisaureus

comment created time in 5 months

pull request commentnodejs/node

test: move test-inspector-connect-main-thread to sequential

I do not have access to a workstation, but can you revert the commit https://github.com/nodejs/node/commit/3d841fe20d732111094c3f62febd5a6b8b483b91? I will take another look at the test when I get an opportunity.

Trott

comment created time in 5 months

push eventeugeneo/node

Rich Trott

commit sha 36864a60fa25394fa034a9bea7c9928c301c0d8f

doc: remove legacy mode deprecation in assert The deprecation was revoked in https://github.com/nodejs/node/pull/28892. PR-URL: https://github.com/nodejs/node/pull/28909 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: James M Snell <jasnell@gmail.com>

view details

himself65

commit sha 2b03e1d0a5ef2a52e4d7ce550b74a961c62e185a

http2: destroy when settingsFn throws an error http2.connect should call destroy when init fails. PR-URL: https://github.com/nodejs/node/pull/28908 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>

view details

Vse Mozhet Byt

commit sha 747ddd5fac191d018c6e9720f21d3ea66872d667

doc: fix sorting nit in sections of http.md PR-URL: https://github.com/nodejs/node/pull/28943 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

view details

cjihrig

commit sha 1592d0ab737f6537bd57cfed31277715afdf609c

report: include network interfaces in report PR-URL: https://github.com/nodejs/node/pull/28911 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>

view details

Rich Trott

commit sha e6c205265a8812b426d0a3c8f3d28c7bf0db224d

test: refactor test-fs-stat.js General code cleanup. PR-URL: https://github.com/nodejs/node/pull/28929 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

view details

Alex Aubuchon

commit sha 5eaef7b9151037c727806a8a40c8f6d5bdb26386

doc: describe NODE_OPTIONS interop w/cmd line opts Fixes https://github.com/nodejs/node/issues/28910 PR-URL: https://github.com/nodejs/node/pull/28928 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

view details

Сковорода Никита Андреевич

commit sha aa252ebf66c4ba5a5861293e7b95beb3436ff780

Revert "src: remove trace_sync_io_ from env" This reverts commit 7fa5f54e6f2854183e45e0e105a1e22a381aac60. The reverted commit breaks the logic behind --trace-sync-io, it should be enabled only at a certain point in time, while that commit enables it from the very start, causing warnings be printed for all sync io instead of sync io after the first tick of the event loop as documented. Fixes: https://github.com/nodejs/node/issues/28913 Refs: https://github.com/nodejs/node/pull/22726 Refs: https://nodejs.org/api/cli.html#cli_trace_sync_io PR-URL: https://github.com/nodejs/node/pull/28926 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>

view details

himself65

commit sha d53035488c7dcfc1355387e27044eb85bc1cd8cc

net: shallow copy option when create Server PR-URL: https://github.com/nodejs/node/pull/28924 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Masashi Hirano <shisama07@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>

view details

Michael Dawson

commit sha e3f4ec94b8360414ecff65d8c04d9fa15d510c7f

doc: remove use of you We generally avoid the use of 'you'. PR-URL: https://github.com/nodejs/node/pull/28919 Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>

view details

Brian White

commit sha 37d27486fce50bd82b6b5095af880d435ed308f8

path: improve normalization performance PR-URL: https://github.com/nodejs/node/pull/28948 Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Gus Caplan <me@gus.host>

view details

isaacs

commit sha d7d321b071789f08c65dbb11a0e4b3b6a299af44

deps: upgrade npm to 6.10.2 PR-URL: https://github.com/nodejs/node/pull/28853 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>

view details

Ruben Bridgewater

commit sha a9e7441916b6ed5f68a9421ddb87b5ddb5c15a92

2019-08-06, Version 12.8.0 (Current) Notable changes: * assert: * Legacy mode deprecation (`DEP0089`) is revoked (Colin Ihrig) https://github.com/nodejs/node/pull/28892 * crypto: * The `outputLength` option is added to `crypto.createHash` (Tobias Nießen) https://github.com/nodejs/node/pull/28805 * The `maxmem` range is increased from 32 to 53 bits (Tobias Nießen) https://github.com/nodejs/node/pull/28799 * n-api: * Added APIs for per-instance state management (Gabriel Schulhof) https://github.com/nodejs/node/pull/28682 * report: * Network interfaces get included in the report (cjihrig) https://github.com/nodejs/node/pull/28911 * src: * `v8.getHeapCodeStatistics()` is now exported (Yuriy Vasiyarov) https://github.com/nodejs/node/pull/27978 PR-URL: https://github.com/nodejs/node/pull/29017

view details

Beth Griggs

commit sha f1478e1789c87a5b20d1a6ed7f58a4bfb07d3e13

2019-08-06, Version 10.16.2 'Dubnium' (LTS) Notable changes: This release patches a regression in the OpenSSL upgrade to 1.1.1c that causes intermittent hangs in machines that have low entropy. Refs: https://github.com/nodejs/node/issues/28932 PR-URL: https://github.com/nodejs/node/pull/29021

view details

Robert Nagy

commit sha 320402c1a18d877fa93c440af17b852612ff7f44

fs: fix (temporary) for esm package Fix to unblock CITGM. See, https://github.com/standard-things/esm/issues/821. PR-URL: https://github.com/nodejs/node/pull/28957 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>

view details

Anna Henningsen

commit sha 4c9fb0b706c6df44393e2b46985320c089aa1784

events: give subclass name in unhandled 'error' message For unhandled `'error'` events, include the constructor name for subclasses of EventEmitter, if possible. This makes tracing errors easier when both creation of the `Error` object and emitting it happen in code that does not refer back to the event emitter. PR-URL: https://github.com/nodejs/node/pull/28952 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>

view details

Brian White

commit sha 0b5b81c82af70072eac09d39ec43b5707d8d8a0c

stream: improve read() performance PR-URL: https://github.com/nodejs/node/pull/28961 Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>

view details

Tobias Nießen

commit sha 0c9ad34427cdc8a68c8b3e7c2d4748f462567680

crypto: extend RSA-OAEP support with oaepHash This adds an oaepHash option to asymmetric encryption which allows users to specify a hash function when using OAEP padding. This feature is required for interoperability with WebCrypto applications. PR-URL: https://github.com/nodejs/node/pull/28335 Fixes: https://github.com/nodejs/node/issues/25756 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com>

view details

Tobias Nießen

commit sha 636dbfe787690f675305e8d5d0f642df8b29834d

test: add test for OAEP hash mismatch PR-URL: https://github.com/nodejs/node/pull/28335 Fixes: https://github.com/nodejs/node/issues/25756 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com>

view details

EduardoRFS

commit sha 84a638484ead2074625ab5198338bcaf784625c6

doc: make unshift doc compliant with push doc readable.unshift() also allows to pass null and end stream PR-URL: https://github.com/nodejs/node/pull/28953 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>

view details

cjihrig

commit sha c072a807178230948ed40dea0708593663efa0cd

fs: validate fds as int32s This commit updates the JS layer's validation of file descriptors to check for int32s >= 0 instead of uint32s. PR-URL: https://github.com/nodejs/node/pull/28984 Fixes: https://github.com/nodejs/node/issues/28980 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>

view details

push time in 5 months

delete branch eugeneo/node

delete branch : connect-main-thread

delete time in 5 months

pull request commentnodejs/node

inspector: new API - Session.connectToMainThread

Landed as https://github.com/nodejs/node/commit/3d841fe20d732111094c3f62febd5a6b8b483b91

eugeneo

comment created time in 5 months

PR closed nodejs/node

inspector: new API - Session.connectToMainThread C++ inspector lib / src semver-minor

This API is designed to enable worker threads use Inspector protocol on main thread (and other workers through NodeWorker domain).

Note that worker can cause dead lock by suspending itself. I will work on a new API that will allow workers to be hidden from the inspector.

Fixes: https://github.com/nodejs/node/issues/28828

<!-- Thank you for your pull request. Please provide a description above and review the requirements below.

Bug fixes and new features should include tests and possibly benchmarks.

Contributors guide: https://github.com/nodejs/node/blob/master/CONTRIBUTING.md -->

Checklist

<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

  • [x] make -j4 test (UNIX), or vcbuild test (Windows) passes
  • [x] tests and/or benchmarks are included
  • [x] documentation is changed or added
  • [x] commit message follows commit guidelines
+0 -0

22 comments

0 changed file

eugeneo

pr closed time in 5 months

push eventeugeneo/node

Anna Henningsen

commit sha 7c9ee6dd88cc2908a3db70eba9c15eddd1112c50

util: add encodeInto to TextEncoder Add function encodeInto to TextEncoder, and add MessageChannel to the encodeInto.any.js test. Fixes: https://github.com/nodejs/node/issues/28851 Fixes: https://github.com/nodejs/node/issues/26904 Refs: https://github.com/nodejs/node/pull/28862 Co-authored-by: AtticusYang <yyongtai@163.com> PR-URL: https://github.com/nodejs/node/pull/29524 Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>

view details

Kirill Fomichev

commit sha 39eb894099f633dc1f3bc82888d4b92e603be679

perf_hooks: remove non-existent entries from inspect Some of the milestones was removed in PR #21247 but entries not removed from function for inspect PerformanceNodeTiming. PR-URL: https://github.com/nodejs/node/pull/29528 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

view details

Chetan Karande

commit sha ddd72eccfe8e74747d24990b4797770134df622e

process: use public readableFlowing property PR-URL: https://github.com/nodejs/node/pull/29502 Refs: https://github.com/nodejs/node/issues/445 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>

view details

Lucas Holmquist

commit sha 30e919a3cfd663ec3f1d971dcdb9970ff8a4779e

repl: add missing variable declaration * Adds `let` to a variable declaration in a for loop that wasn't using anything. * Declare the for initial expression in the for loop. * Remove hoisted variables for loops. PR-URL: https://github.com/nodejs/node/pull/29535 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

view details

Kamil Rytarowski

commit sha 233cdb64a95eaabce922d773f3e312565e18a9d4

build: allow clang 10+ in configure.py Detected on NetBSD/amd64. Fixes: https://github.com/nodejs/node/issues/29536 PR-URL: https://github.com/nodejs/node/pull/29541 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>

view details

Anna Henningsen

commit sha e095e645e52f14e135e80f0f910c812ca767ff31

src: print exceptions from PromiseRejectCallback Previously, leaving the exception lying around would leave the JS engine in an invalid state, as it was not expecting exceptions to be thrown from the C++ `PromiseRejectCallback`, and lead to hard crashes under some conditions (e.g. with coverage enabled). PR-URL: https://github.com/nodejs/node/pull/29513 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>

view details

zhangyongsheng

commit sha 5de1052dc9253ef7d9bbfb3e620e60cfbf7081b5

tools: update ESLint to 6.4.0 PR-URL: https://github.com/nodejs/node/pull/29553 Refs: https://github.com/eslint/eslint/releases/tag/v6.4.0 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com>

view details

antsmartian

commit sha ed0e5c8c744439c759343030bd429bc514aef5c0

repl: add autocomplete support for fs.promises PR-URL: https://github.com/nodejs/node/pull/29400 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>

view details

Robert Nagy

commit sha 627bb6bf8716131c942ea8a274390d09d1984923

http: refactor responseKeepAlive() This tries to simplify the code and make it easier to understand. Took me a while to get my head around the previous implementation. Also minor perf improvement. PR-URL: https://github.com/nodejs/node/pull/28700 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>

view details

Aditya

commit sha 70abb4ffe40c8526c5415c02c20b7b3a3cdbacd2

tty: add color support for mosh PR-URL: https://github.com/nodejs/node/pull/27843 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>

view details

Eugene Ostroukhov

commit sha 3d841fe20d732111094c3f62febd5a6b8b483b91

inspector: new API - Session.connectToMainThread This API is designed to enable worker threads use Inspector protocol on main thread (and other workers through NodeWorker domain). Note that worker can cause dead lock by suspending itself. I will work on a new API that will allow workers to be hidden from the inspector. Fixes: https://github.com/nodejs/node/issues/28828 PR-URL: https://github.com/nodejs/node/pull/28870 Reviewed-By: Aleksei Koziatinskii <ak239spb@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>

view details

push time in 5 months

push eventnodejs/node

Eugene Ostroukhov

commit sha 3d841fe20d732111094c3f62febd5a6b8b483b91

inspector: new API - Session.connectToMainThread This API is designed to enable worker threads use Inspector protocol on main thread (and other workers through NodeWorker domain). Note that worker can cause dead lock by suspending itself. I will work on a new API that will allow workers to be hidden from the inspector. Fixes: https://github.com/nodejs/node/issues/28828 PR-URL: https://github.com/nodejs/node/pull/28870 Reviewed-By: Aleksei Koziatinskii <ak239spb@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>

view details

push time in 5 months

issue closednodejs/node

Connect inspector.Session to inspector in another process or thread.

<!-- Thank you for suggesting an idea to make Node.js better.

Please fill in as much of the template below as you're able. -->

Is your feature request related to a problem? Please describe. I want to use the inspector module in a worker thread to control the inspector in another thread.

const { isMainThread, Worker } = require('worker_threads');
const inspector = require('inspector');

if (isMainThread) {
  new Worker(__filename)
} else {
  // session connects to the worker thread inspector, not the main thread.
  const session = new inspector.Session();
  session.connect();
}

inspector.Session doesn't support connecting to the inspector of a different thread or process.

Describe the solution you'd like

  • add a url parameter to inspector.Session
if (isMainThread) {
  inspector.open(0);
  const url = inspector.url();
  new Worker(__filename, { workerData: { url }})
} else {
  const session = new inspector.Session(workerData.url);
  // ...
}
  • or allow inspector to be transfered
if (isMainThread) {
  new Worker(__filename, { workerData: { inspector }})
} else {
  const session = new new workerData.inspector.Session();
  // ...
}

Describe alternatives you've considered The v8 inspector API is not complicated and I have written a client using the ws npm module instead of using inspector.Session.


I'm open to writing a CR to implement this, but I would like feedback from a maintainer before I start, especially because both worker_threads and inspector are experimental.

closed time in 5 months

everett1992

pull request commentnodejs/node

inspector: new API - Session.connectToMainThread

The test is fixed, I will land this change next Monday.

eugeneo

comment created time in 5 months

push eventeugeneo/node

Eugene Ostroukhov

commit sha 987bb00388050bdeb61e2e1a7eb4741c34406cdf

squash: use the SharedArrayBuffer for synchronization

view details

push time in 5 months

push eventeugeneo/node

Eugene Ostroukhov

commit sha 11336803fbbcaf65194c07ecb1aad67795b19b25

squash: trying to reproduce issue on some platforms

view details

push time in 5 months

pull request commentnodejs/node

inspector: new API - Session.connectToMainThread

ARM fails on the new test, different console output seems to be indicative of a race condition: 12:30:12 not ok 647 parallel/test-inspector-connect-main-thread 12:30:12 --- 12:30:12 duration_ms: 240.110 12:30:12 severity: fail 12:30:12 exitcode: -15 12:30:12 stack: |- 12:30:12 timeout 12:30:12 Message NodeWorker.enable was sent 12:30:12 Skip child is done 12:30:12 Message Debugger.enable was sent 12:30:12 Message Runtime.enable was sent 12:30:12 Message Debugger.setBreakpointByUrl was sent 12:30:12 Message for a test

eugeneo

comment created time in 5 months

pull request commentnodejs/node

inspector: new API - Session.connectToMainThread

Fixed test and rebased - new CI run: https://ci.nodejs.org/job/node-test-pull-request/25479/

eugeneo

comment created time in 5 months

push eventeugeneo/node

Samuel Attard

commit sha 33ae95c58da835086e6f9581715208c2d6ecfd70

src: expose MaybeInitializeContext to allow existing contexts Splits the node.js specific tweak intialization of NewContext into a new helper MaybeInitializeContext so that embedders with existing contexts can still use them in a Node.js Environment now that primordials are initialized and required so early. Update MaybeInitializeContext to return MaybeLocal, PR-URL: https://github.com/nodejs/node/pull/28544 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>

view details

Kamat, Trivikram

commit sha 5c9209bc4d9f5e7da78eb03824ad27add5324bc8

doc,errors: add extends to derived classes PR-URL: https://github.com/nodejs/node/pull/29303 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>

view details

Kamat, Trivikram

commit sha fd964de1b7df1d97b228b1196ecbc312e162ea8f

doc,fs: add extends for derived classes PR-URL: https://github.com/nodejs/node/pull/29304 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>

view details

Christian Clauss

commit sha b2cce432f3ee91547e9a7c10560877d1d00229df

test: use print() function in both Python 2 and 3 PR-URL: https://github.com/nodejs/node/pull/29298 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Rich Trott <rtrott@gmail.com>

view details

cclauss

commit sha 4662f67e3849d1e3d5127cc5ebc469d1febca57f

tools: fix Python 3 issues in inspector_protocol PR-URL: https://github.com/nodejs/node/pull/29296 Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>

view details

cclauss

commit sha bfa2683eb63b0934e307b072072478ee0c7dbc8f

build: test Python 3.6 and 3.7 on Travis CI PR-URL: https://github.com/nodejs/node/pull/29291 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com>

view details

Joyee Cheung

commit sha f96f9fbe31f30d2effe3cd3a74c19a05360757a5

build: make --without-snapshot imply --without-node-snapshot PR-URL: https://github.com/nodejs/node/pull/29294 Fixes: https://github.com/nodejs/node/issues/29243 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>

view details

Brian White

commit sha 5ba3a2c4b6dfb928a097b36523d59cd5fa70706b

events: improve once() performance PR-URL: https://github.com/nodejs/node/pull/29307 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>

view details

cjihrig

commit sha c246f813f8b1bbc8f0e13ab77452da4dff437635

errors: provide defaults for unmapped uv errors libuv does not map 100% of errors. When an unmapped error is encountered, the Map returns undefined, which is then unsuccessfully destructured, causing an exception. This commit adds a default value in the event of an unmapped error. PR-URL: https://github.com/nodejs/node/pull/29288 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>

view details

Matheus Marchini

commit sha 01504904f3b220b68666d9c2d37e13615e0a2fc1

src: allow --interpreted-frames-native-stack in NODE_OPTIONS PR-URL: https://github.com/nodejs/node/pull/27744 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>

view details

Brian White

commit sha 34961c7b5fe8b2cf1722668666a7adcce3ab419c

process: improve nextTick performance PR-URL: https://github.com/nodejs/node/pull/25461 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>

view details

Rich Trott

commit sha 3ae6f5e1169f423e71036d1bbd62f2c26b136914

test: fix flaky test-http-server-keepalive-req-gc Use `server` to keep the event loop open until the `ongc` listener runs. PR-URL: https://github.com/nodejs/node/pull/29347 Fixes: https://github.com/nodejs/node/issues/29344 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>

view details

Brian White

commit sha 248e9ec1247af05f0b21885814c89165c281a64e

querystring: improve performance PR-URL: https://github.com/nodejs/node/pull/29306 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>

view details

cjihrig

commit sha 0259aadc5a2330dfa8b444e67114d0c0cbc9aae1

tools: update babel-eslint to 10.0.3 PR-URL: https://github.com/nodejs/node/pull/29320 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>

view details

cjihrig

commit sha 403dacf9ce205d591b27c937141feb8321774c0b

tools: update ESLint to 6.2.2 Update ESLint to 6.2.2 PR-URL: https://github.com/nodejs/node/pull/29320 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>

view details

Rich Trott

commit sha 167960f3ca57c7c3ef73e8b32f233189381244a0

test: fix test-benchmark-net Fix test-benchmark-net to accommodate recent benchmark additions. PR-URL: https://github.com/nodejs/node/pull/29359 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

view details

Brian White

commit sha bb1af6c82f495e432821c30d21ccde3efb9eb72b

buffer: consolidate encoding parsing PR-URL: https://github.com/nodejs/node/pull/29217 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net>

view details

Brian White

commit sha 5dc5cfba7d4feadc3358d17f974858726e00593f

buffer: correct indexOf() error message PR-URL: https://github.com/nodejs/node/pull/29217 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net>

view details

Anna Henningsen

commit sha a194eacc96116a8253dcb0c6114204eea4972df3

util: do not throw when inspecting detached ArrayBuffer PR-URL: https://github.com/nodejs/node/pull/29318 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Gus Caplan <me@gus.host>

view details

David Carlier

commit sha 8675152f0f15002915225216f48e8bdd39612a81

build: integrate DragonFlyBSD into gyp build PR-URL: https://github.com/nodejs/node/pull/29313 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>

view details

push time in 5 months

more