Skip to content

Commit ce4bcd5

Browse files
targosmarco-ippolito
authored andcommitted
src: initialize FSReqWrapSync in path that uses it
PR-URL: #56613 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent c36766b commit ce4bcd5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/node_file.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2423,7 +2423,6 @@ static void WriteString(const FunctionCallbackInfo<Value>& args) {
24232423
}
24242424
} else { // write(fd, string, pos, enc, undefined, ctx)
24252425
CHECK_EQ(argc, 6);
2426-
FSReqWrapSync req_wrap_sync;
24272426
FSReqBase::FSReqBuffer stack_buffer;
24282427
if (buf == nullptr) {
24292428
if (!StringBytes::StorageSize(isolate, value, enc).To(&len))
@@ -2437,6 +2436,7 @@ static void WriteString(const FunctionCallbackInfo<Value>& args) {
24372436
buf = *stack_buffer;
24382437
}
24392438
uv_buf_t uvbuf = uv_buf_init(buf, len);
2439+
FSReqWrapSync req_wrap_sync("write");
24402440
FS_SYNC_TRACE_BEGIN(write);
24412441
int bytesWritten = SyncCall(env, args[5], &req_wrap_sync, "write",
24422442
uv_fs_write, fd, &uvbuf, 1, pos);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy