Files
node/lib/internal
Joyee Cheung cd8f06f64f fs: do not crash when using a closed fs event watcher
Before this commit, when the user calls methods on a closed or
errored fs event watcher, they could hit a crash since the
FSEventWrap in C++ land may have already been destroyed with
the internal pointer set to nullptr. This commit makes sure
that the user cannot hit crashes like that, instead the
methods calling on a closed watcher will be noops.

Also explicitly documents that the watchers should not be used
in `close` and `error` event handlers.

PR-URL: https://github.com/nodejs/node/pull/20985
Fixes: https://github.com/nodejs/node/issues/20738
Fixes: https://github.com/nodejs/node/issues/20297
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Ron Korving <ron@ronkorving.nl>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
2018-06-03 17:15:17 +02:00
..
2018-05-18 15:25:38 +02:00
2018-06-03 16:24:31 +02:00
2017-11-16 15:42:46 -08:00
2018-04-29 16:52:46 +02:00
2018-05-18 15:25:38 +02:00
2018-03-30 19:41:41 -05:00
2018-05-18 15:25:41 +02:00
2018-05-10 13:40:45 +02:00
2018-03-30 14:20:40 +02:00
2017-08-14 15:43:10 -04:00
2018-02-16 18:09:56 +01:00
2018-05-18 15:31:57 +02:00
2018-05-18 15:25:41 +02:00
2018-05-18 15:25:39 +02:00
2018-05-03 14:47:17 +02:00

Internal Modules

The modules in lib/internal are intended for internal use in Node.js core only, and are not accessible with require() from user modules. These are subject to change at any time. Reliance on these modules outside of core is not supported in any way.