Files
node/lib/internal
Anna Henningsen 541be526c3 fs: do not throw exception after creating FSReqCallback
Once an `FSReqCallback` instance is created, it is a GC root until
the underlying fs operation has completed, meaning that it cannot
be garbage collected.

This is a problem when the underlying operation never starts
because an exception is thrown before that happens, for example
as part of parameter validation.

Instead, move all potentially throwing code before the `FSReqCallback`
creation.

PR-URL: https://github.com/nodejs/node/pull/35487
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2020-10-06 15:10:26 -04:00
..
2020-08-05 08:54:29 -07:00
2020-08-24 12:19:58 +01:00
2020-08-20 15:05:24 +01:00
2020-09-01 11:15:46 -04:00
2020-09-01 11:15:46 -04:00
2020-06-30 09:34:24 -07:00
2020-09-01 11:15:46 -04:00
2020-09-03 07:02:16 -04:00
2020-01-22 15:33:03 +01:00
2019-11-30 13:58:25 +01:00
2019-12-17 08:11:13 -05:00
2020-08-20 15:05:24 +01: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 modules can be changed at any time. Reliance on these modules outside of core is not supported in any way.