src: use MaybeLocal.ToLocal instead of IsEmpty
This commit suggest using MaybeLocal.ToLocal
and passing in the
Local<Function>
fn.
The motivation for doing this is that the following
MaybeLocal.ToLocalChecked
call can then be avoided.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
commit message follows commit guidelines