Change IsPhysicalFile to DCHECK in ReadOnlyFile
Mojo serialization should not be blocking, but this CHECK included a blocking call to Fstat. This prevents DisallowScopedBlocking consumers from using this type. We now call fstat directly and while this could block in practice this should be quick for already opened physical files. The remaining CHECK calls fcntl with F_GETFL which essentially just copies an int from the kernel back to the process, so can be considered non-blocking, and so left in place. Bug: 1130762 Change-Id: Iced551675d5e8c74ac62b8bcbffc240dbde1aa95 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2466203Reviewed-by:Ken Rockot <rockot@google.com> Reviewed-by:
Kinuko Yasuda <kinuko@chromium.org> Reviewed-by:
Matthew Denton <mpdenton@chromium.org> Commit-Queue: Alex Gough <ajgo@chromium.org> Cr-Commit-Position: refs/heads/master@{#817104}
Showing
Please register or sign in to comment