Files
node/lib
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-02-18 22:15:50 -08:00
2020-09-15 11:20:08 -04:00
2020-06-30 09:34:02 -07:00
2020-06-30 09:33:57 -07:00
2020-09-07 12:29:20 -04:00
2020-06-30 09:34:15 -07:00
2020-06-30 09:34:17 -07:00
2020-06-30 09:34:26 -07:00
2018-11-20 10:42:31 -08:00
2020-03-09 12:44:16 +01:00
2020-05-04 14:23:19 +02:00
2019-12-11 16:38:06 -06:00
2020-08-20 15:05:09 +01:00
2020-05-16 12:52:06 -07:00
2020-07-16 17:08:56 -04:00