Rich Trott
4fb780334d
doc,src,test: revise C++ code for linter update
...
PR-URL: https://github.com/nodejs/node/pull/35719
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2020-10-23 03:47:50 -07:00
Anna Henningsen
0fb91acedf
src: disallow JS execution inside FreeEnvironment
...
This addresses a TODO comment, and aligns the behavior between
worker threads and the main thread.
The primary motivation for this change is to more strictly enforce
the invariant that no JS runs after the `'exit'` event is emitted.
PR-URL: https://github.com/nodejs/node/pull/33874
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
2020-06-24 17:43:29 -07:00
Anna Henningsen
8ebd339031
worker: improve integration with native addons
...
Allow loading add-ons from multiple Node.js instances if they are
declared context-aware; in particular, this applies to N-API addons.
Also, plug a memory leak that occurred when registering N-API addons.
Refs: https://github.com/nodejs/node/pull/23319
PR-URL: https://github.com/nodejs/node/pull/26175
Fixes: https://github.com/nodejs/node/issues/21481
Fixes: https://github.com/nodejs/node/issues/21783
Fixes: https://github.com/nodejs/node/issues/25662
Fixes: https://github.com/nodejs/node/issues/20239
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2019-02-22 21:42:09 +01:00
Anna Henningsen
ef1c639db5
src: restrict unloading addons to Worker threads
...
Unloading native addons from the main thread was an (presumably
unintended) significant breaking change, because addons may
rely on their memory being available after an `Environment` exits.
This patch only restricts this to Worker threads, at least for the
time being, and thus matches the behaviour from
https://github.com/nodejs/node/pull/23319 .
PR-URL: https://github.com/nodejs/node/pull/25577
Refs: https://github.com/nodejs/node/pull/24861
Refs: https://github.com/nodejs/node/pull/23319
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2019-01-23 05:35:46 +01:00
Anna Henningsen
622e348d8f
test,doc: add tests and docs for addon unloading
...
Originally from portions of https://github.com/nodejs/node/pull/23319/ .
PR-URL: https://github.com/nodejs/node/pull/24861
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2018-12-19 18:34:28 -08:00