Shelley Vohr
5c3d484c21
src: check microtasks before running them
...
PR-URL: https://github.com/nodejs/node/pull/29434
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Minwoo Jung <minwoo@nodesource.com >
2019-09-20 09:36:19 +02:00
Joyee Cheung
242466167d
src: move TickInfo out of Environment
...
PR-URL: https://github.com/nodejs/node/pull/26824
Refs: https://github.com/nodejs/node/issues/26776
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-03-27 10:30:14 -04:00
Joyee Cheung
cc7bb855a7
src: move AsyncCallbackScope out of Environment
...
PR-URL: https://github.com/nodejs/node/pull/26824
Refs: https://github.com/nodejs/node/issues/26776
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-03-27 10:30:11 -04:00
Joyee Cheung
51970537ee
src: move AsyncHooks out of Environment
...
PR-URL: https://github.com/nodejs/node/pull/26824
Refs: https://github.com/nodejs/node/issues/26776
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-03-27 10:30:09 -04:00
Anna Henningsen
bca23f2ee7
src: only open HandleScope when necessary
...
PR-URL: https://github.com/nodejs/node/pull/26734
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
2019-03-22 00:45:48 +01:00
Gireesh Punathil
d35af56e5f
src: shutdown node in-flight
...
This commit introduces a `node::Stop()` API.
An identified use case for embedders is their ability to tear down
Node while it is still running (event loop contain pending events)
Here the assumptions are that (i) embedders do not wish to resort to
JS routines to initiate shutdown (ii) embedders have the Environment
handle handy. (iii) embedders stop Node through a second thread.
Fixes: https://github.com/nodejs/node/issues/19365
Refs: https://github.com/nodejs/user-feedback/issues/51
PR-URL: https://github.com/nodejs/node/pull/21283
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Michael Dawson <Michael_Dawson@ca.ibm.com >
2019-03-16 12:50:26 +05:30
gengjiawen
5e23bac9dd
src: fix typo in callback.cc
...
PR-URL: https://github.com/nodejs/node/pull/26337
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-03-04 02:42:20 +01:00
Anna Henningsen
783c65ebc4
src: add debug CHECKs against empty handles
...
These checks were useful while investigating other issues;
using empty `Local<>`s can be very un-debuggable, because that
typically does not lead to assertions with debugging information
but rather crashes based on accessing invalid memory.
PR-URL: https://github.com/nodejs/node/pull/26125
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-02-17 18:09:14 +01:00
Joyee Cheung
ca9e24e8b4
src: move public C++ APIs into src/api/*.cc
...
This patch moves most of the public C++ APIs into src/api/*.cc
so that it's easier to tell that we need to be careful about
the compatibility of these code.
Some APIs, like `node::LoadEnvironmet()`, `node::Start()` and
`node::Init()` still stay in `node.cc` because they are still
very specific to our use cases and do not work quite well yet
for embedders anyway - we could not even manage to write cctest for
them at the moment.
PR-URL: https://github.com/nodejs/node/pull/25541
Reviewed-By: Gus Caplan <me@gus.host >
2019-02-01 07:43:27 +08:00