Skip to content

Commit b8b3a5c

Browse files
fixup! add comment to handleErrorFromBinding
Co-authored-by: Joyee Cheung <joyeec9h3@gmail.com>
1 parent b96887d commit b8b3a5c

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

lib/internal/fs/promises.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,10 @@ function lazyFsStreams() {
130130
return fsStreams ??= require('internal/fs/streams');
131131
}
132132

133+
// By the time the C++ land creates an error for a promise rejection (likely from a
134+
// libuv callback), there is already no JS frames on the stack. So we need to
135+
// wait until V8 resumes execution back to JS land before we have enough information
136+
// to re-capture the stack trace.
133137
function handleErrorFromBinding(error) {
134138
ErrorCaptureStackTrace(error, handleErrorFromBinding);
135139
return PromiseReject(error);

0 commit comments

Comments
 (0)