summaryrefslogtreecommitdiff
path: root/src/inspector_socket.h
AgeCommit message (Collapse)Author
2019-05-13src: remove util-inl.h from header filesSam Roberts
Its intended that *-inl.h header files are only included into the src files that call the inline methods. Explicitly include it into the files that need it. PR-URL: https://github.com/nodejs/node/pull/27631 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-04-24src: apply clang-tidy rule modernize-use-equals-defaultgengjiawen
PR-URL: https://github.com/nodejs/node/pull/27264 Reviewed-By: Refael Ackermann <refack@gmail.com>
2019-03-17src: inline macro DISALLOW_COPY_AND_ASSIGNgengjiawen
PR-URL: https://github.com/nodejs/node/pull/26634 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Refael Ackermann <refack@gmail.com>
2018-08-28src: add missing `NODE_WANT_INTERNALS` guardsAnna Henningsen
We generally add these to all headers that are considered internal to Node. These aren’t distributed as part of the headers tarball, so I think this does not have to be semver-major (and we have been changing the APIs in these headers freely anyway). PR-URL: https://github.com/nodejs/node/pull/22514 Reviewed-By: James M Snell <jasnell@gmail.com>
2018-06-05inspector: code cleanupEugene Ostroukhov
Remove some unused code from the WS server implementation and switch to smart pointers where possible. PR-URL: https://github.com/nodejs/node/pull/21070 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2018-04-02inspector: report client-visible host and portEugene Ostroukhov
Node instance may not know the real host and port user sees when debug frontend connects through the SSH tunnel. This change fixes '/json/list' response by using the value client provided in the host header. PR-URL: https://github.com/nodejs/node/pull/19664 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
2017-12-11inspector: Fix crash for WS connectionEugene Ostroukhov
Attaching WS session will now include a roundtrip onto the main thread to make sure there is no other session (e.g. JS bindings) This change also required refactoring WS socket implementation to better support scenarios like this. Fixes: https://github.com/nodejs/node/issues/16852 PR-URL: https://github.com/nodejs/node/pull/17085 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com>
2017-10-30src: do not include x.h if x-inl.h is includedJoyee Cheung
PR-URL: https://github.com/nodejs/node/pull/16548 Fixes: https://github.com/nodejs/node/issues/16519 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-06-16inspector: perform DNS lookup for hostEugene Ostroukhov
PR-URL: https://github.com/nodejs/node/pull/13478 Fixes: https://github.com/nodejs/node/issues/13477 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-06-01inspector: refactor to rename and comment methodsSam Roberts
Pure refactor, makes no functional changes but the renaming helped me see more clearly what the relationship was between methods and variables. * Renamed methods to reduce number of slightly different names for the same thing ("thread" vs "io thread", etc.). * Added comments where it was useful to me. PR-URL: https://github.com/nodejs/node/pull/13321 Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
2016-09-20inspector: zero out structure membersEugene Ostroukhov
Ctor has to be added as memset to 0 is no longer an option, since the structure now has std::vector member. Attempt at fixing nodejs/node#8155 (so far I was not able to repro it) PR-URL: https://github.com/nodejs/node/pull/8536 Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
2016-08-31inspector: simplify buffer managementEugene Ostroukhov
This change simplifies buffer management to address a number of issues that original implementation had. Original implementation was trying to reduce the number of allocations by providing regions of the internal buffer to libuv IO code. This introduced some potential use after free issues if the buffer grows (or shrinks) while there's a pending read. It also had some confusing math that resulted in issues on Windows version of the libuv. PR-URL: https://github.com/nodejs/node/pull/8257 Fixes: https://github.com/nodejs/node/issues/8155 Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
2016-08-01src: avoid manual memory management in inspectorBen Noordhuis
Make the inspector code easier to reason about by restructuring it to avoid manual memory allocation and copying as much as possible. An amusing side effect is that it reduces the total amount of memory used in the test suite. Before: $ valgrind ./out/Release/cctest 2>&1 | grep 'total heap' | cut -c31- 1,017 allocs, 1,017 frees, 21,695,456 allocated After: $ valgrind ./out/Release/cctest 2>&1 | grep 'total heap' | cut -c31- 869 allocs, 869 frees, 14,484,641 bytes allocated PR-URL: https://github.com/nodejs/node/pull/7906 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
2016-05-30src,lib: v8-inspector supportPavel Feldman
This change introduces experimental v8-inspector support. This brings the DevTools debug protocol allowing Node.js to be debugged with Chrome DevTools native, or through other debuggers supporting that protocol. Partial WebSocket support, to the extent required by DevTools, is included. This is derived from the implementation in Blink. v8-inspector support can be disabled by the --without-inspector configure flag. PR-URL: https://github.com/nodejs/node/pull/6792 Reviewed-By: jasnell - James M Snell <jasnell@gmail.com> Reviewed-By: addaleax - Anna Henningsen <anna@addaleax.net> Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>