[webkit-reviews] review denied: [Bug 234103] Add FileSystem function to read a file at a path : [Attachment 446768] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Dec 10 12:04:57 PST 2021


Alex Christensen <achristensen at apple.com> has denied Don Olmstead
<don.olmstead at sony.com>'s request for review:
Bug 234103: Add FileSystem function to read a file at a path
https://bugs.webkit.org/show_bug.cgi?id=234103

Attachment 446768: Patch

https://bugs.webkit.org/attachment.cgi?id=446768&action=review




--- Comment #14 from Alex Christensen <achristensen at apple.com> ---
Comment on attachment 446768
  --> https://bugs.webkit.org/attachment.cgi?id=446768
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=446768&action=review

> Source/WTF/wtf/FileSystem.cpp:541
> +    auto contents = readEntireFile(handle);

readEntireFile calls readFromFile once.  readFromFile can return a positive
number of bytes indicating that the file was partially read successfully and
you need to call it again to read the rest.  I think it would be worth fixing
that while making more functionality rely on it just working.  Otherwise we
will increase the number of times a file read is reported to fail, especially
with larger files.
It would probably also be worth returning failure if the large allocation fails
instead of crashing.


More information about the webkit-reviews mailing list