mirror of https://github.com/nodejs/node.git
src: initialize FSReqWrapSync in path that uses it
PR-URL: https://github.com/nodejs/node/pull/56613 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>pull/55256/merge
parent
009d53ec3c
commit
322056dc32
|
@ -2482,7 +2482,6 @@ static void WriteString(const FunctionCallbackInfo<Value>& args) {
|
|||
}
|
||||
} else { // write(fd, string, pos, enc, undefined, ctx)
|
||||
CHECK_EQ(argc, 6);
|
||||
FSReqWrapSync req_wrap_sync;
|
||||
FSReqBase::FSReqBuffer stack_buffer;
|
||||
if (buf == nullptr) {
|
||||
if (!StringBytes::StorageSize(isolate, value, enc).To(&len))
|
||||
|
@ -2496,6 +2495,7 @@ static void WriteString(const FunctionCallbackInfo<Value>& args) {
|
|||
buf = *stack_buffer;
|
||||
}
|
||||
uv_buf_t uvbuf = uv_buf_init(buf, len);
|
||||
FSReqWrapSync req_wrap_sync("write");
|
||||
FS_SYNC_TRACE_BEGIN(write);
|
||||
int bytesWritten = SyncCall(env, args[5], &req_wrap_sync, "write",
|
||||
uv_fs_write, fd, &uvbuf, 1, pos);
|
||||
|
|
Loading…
Reference in New Issue