Lines Matching refs:req_wrap

340       FileHandleReadWrap* req_wrap = FileHandleReadWrap::from_req(req);  in ReadStart()  local
341 handle = req_wrap->file_handle_; in ReadStart()
342 CHECK_EQ(handle->current_read_.get(), req_wrap); in ReadStart()
406 int FileHandle::DoShutdown(ShutdownWrap* req_wrap) { in DoShutdown() argument
407 FileHandleCloseWrap* wrap = static_cast<FileHandleCloseWrap*>(req_wrap); in DoShutdown()
492 FSReqBase* req_wrap = FSReqBase::from_req(req); in AfterNoArgs() local
493 FSReqAfterScope after(req_wrap, req); in AfterNoArgs()
496 req_wrap->Resolve(Undefined(req_wrap->env()->isolate())); in AfterNoArgs()
500 FSReqBase* req_wrap = FSReqBase::from_req(req); in AfterStat() local
501 FSReqAfterScope after(req_wrap, req); in AfterStat()
504 req_wrap->ResolveStat(&req->statbuf); in AfterStat()
509 FSReqBase* req_wrap = FSReqBase::from_req(req); in AfterInteger() local
510 FSReqAfterScope after(req_wrap, req); in AfterInteger()
513 req_wrap->Resolve(Integer::New(req_wrap->env()->isolate(), req->result)); in AfterInteger()
517 FSReqBase* req_wrap = FSReqBase::from_req(req); in AfterOpenFileHandle() local
518 FSReqAfterScope after(req_wrap, req); in AfterOpenFileHandle()
521 FileHandle* fd = new FileHandle(req_wrap->env(), req->result); in AfterOpenFileHandle()
522 req_wrap->Resolve(fd->object()); in AfterOpenFileHandle()
527 FSReqBase* req_wrap = FSReqBase::from_req(req); in AfterStringPath() local
528 FSReqAfterScope after(req_wrap, req); in AfterStringPath()
534 link = StringBytes::Encode(req_wrap->env()->isolate(), in AfterStringPath()
536 req_wrap->encoding(), in AfterStringPath()
539 req_wrap->Reject(error); in AfterStringPath()
541 req_wrap->Resolve(link.ToLocalChecked()); in AfterStringPath()
546 FSReqBase* req_wrap = FSReqBase::from_req(req); in AfterStringPtr() local
547 FSReqAfterScope after(req_wrap, req); in AfterStringPtr()
553 link = StringBytes::Encode(req_wrap->env()->isolate(), in AfterStringPtr()
555 req_wrap->encoding(), in AfterStringPtr()
558 req_wrap->Reject(error); in AfterStringPtr()
560 req_wrap->Resolve(link.ToLocalChecked()); in AfterStringPtr()
565 FSReqBase* req_wrap = FSReqBase::from_req(req); in AfterScanDir() local
566 FSReqAfterScope after(req_wrap, req); in AfterScanDir()
571 Environment* env = req_wrap->env(); in AfterScanDir()
586 return req_wrap->Reject( in AfterScanDir()
587 UVException(r, nullptr, req_wrap->syscall(), in AfterScanDir()
594 req_wrap->encoding(), in AfterScanDir()
597 return req_wrap->Reject(error); in AfterScanDir()
616 req_wrap->Resolve(names); in AfterScanDir()
620 FSReqBase* req_wrap = FSReqBase::from_req(req); in AfterScanDirWithTypes() local
621 FSReqAfterScope after(req_wrap, req); in AfterScanDirWithTypes()
627 Environment* env = req_wrap->env(); in AfterScanDirWithTypes()
646 return req_wrap->Reject( in AfterScanDirWithTypes()
647 UVException(r, nullptr, req_wrap->syscall(), in AfterScanDirWithTypes()
654 req_wrap->encoding(), in AfterScanDirWithTypes()
657 return req_wrap->Reject(error); in AfterScanDirWithTypes()
701 req_wrap->Resolve(result); in AfterScanDirWithTypes()
720 FSReqBase* req_wrap, in AsyncDestCall() argument
724 CHECK_NOT_NULL(req_wrap); in AsyncDestCall()
725 req_wrap->Init(syscall, dest, len, enc); in AsyncDestCall()
726 int err = req_wrap->Dispatch(fn, fn_args..., after); in AsyncDestCall()
728 uv_fs_t* uv_req = req_wrap->req(); in AsyncDestCall()
732 req_wrap = nullptr; in AsyncDestCall()
734 req_wrap->SetReturnValue(args); in AsyncDestCall()
737 return req_wrap; in AsyncDestCall()
743 FSReqBase* req_wrap, in AsyncCall() argument
747 return AsyncDestCall(env, req_wrap, args, in AsyncCall()
757 inline int SyncCall(Environment* env, Local<Value> ctx, FSReqWrapSync* req_wrap, in SyncCall() argument
760 int err = fn(env->event_loop(), &(req_wrap->req), args..., nullptr); in SyncCall()
1317 FSReqBase* req_wrap = FSReqBase::from_req(req); in MKDirpAsync() local
1319 if (req_wrap->continuation_data == nullptr) { in MKDirpAsync()
1320 req_wrap->continuation_data = std::unique_ptr<FSContinuationData>{ in MKDirpAsync()
1322 req_wrap->continuation_data->PushPath(std::move(path)); in MKDirpAsync()
1326 std::string next_path = req_wrap->continuation_data->PopPath(); in MKDirpAsync()
1329 FSReqBase* req_wrap = FSReqBase::from_req(req); in MKDirpAsync() local
1330 Environment* env = req_wrap->env(); in MKDirpAsync()
1338 if (req_wrap->continuation_data->paths.size() == 0) { in MKDirpAsync()
1339 req_wrap->continuation_data->Done(0); in MKDirpAsync()
1343 req_wrap->continuation_data->mode, nullptr); in MKDirpAsync()
1351 req_wrap->continuation_data->PushPath(std::move(path)); in MKDirpAsync()
1352 req_wrap->continuation_data->PushPath(std::move(dirname)); in MKDirpAsync()
1353 } else if (req_wrap->continuation_data->paths.size() == 0) { in MKDirpAsync()
1359 req_wrap->continuation_data->mode, nullptr); in MKDirpAsync()
1363 req_wrap->continuation_data->Done(err); in MKDirpAsync()
1372 FSReqBase* req_wrap = FSReqBase::from_req(req); in MKDirpAsync() local
1375 req_wrap->continuation_data->paths.size() > 0) { in MKDirpAsync()
1377 Environment* env = req_wrap->env(); in MKDirpAsync()
1382 req_wrap->continuation_data->mode, nullptr); in MKDirpAsync()
1390 req_wrap->continuation_data->Done(err); in MKDirpAsync()
1392 if (err < 0) req_wrap->continuation_data->Done(err); in MKDirpAsync()