| Summary: | Pass nullptr for the 2nd argument of FileReaderLoader | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Tetsuharu Ohzeki [UTC+9] <tetsuharu.ohzeki> | ||||||
| Component: | DOM | Assignee: | Nobody <webkit-unassigned> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | darin, webkit-bug-importer | ||||||
| Priority: | P2 | Keywords: | InRadar | ||||||
| Version: | WebKit Nightly Build | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Attachments: |
|
||||||||
|
Description
Tetsuharu Ohzeki [UTC+9]
2020-06-02 09:54:10 PDT
Created attachment 400832 [details]
Patch
Comment on attachment 400832 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=400832&action=review > Source/WebCore/ChangeLog:3 > + Use WTF::Optional for the 2nd argument of FileReaderLoader Why? Comment on attachment 400832 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=400832&action=review >> Source/WebCore/ChangeLog:3 >> + Use WTF::Optional for the 2nd argument of FileReaderLoader > > Why? Pointers are intrinsically "optional" and we use nullptr to mean "no value". (In reply to Darin Adler from comment #3) > Comment on attachment 400832 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=400832&action=review > > >> Source/WebCore/ChangeLog:3 > >> + Use WTF::Optional for the 2nd argument of FileReaderLoader > > > > Why? > > Pointers are intrinsically "optional" and we use nullptr to mean "no value". I know it. First, I had thought replacing this `0` to `nullptr`. https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/fileapi/FileReaderSync.cpp#L48 But I think it maybe better to use WTF::Optional. To make it more simply, Is replacing nullptr best? (In reply to Tetsuharu Ohzeki from comment #4) > To make it more simply, Is replacing nullptr best? Yes, I think so. (In reply to Darin Adler from comment #5) > (In reply to Tetsuharu Ohzeki from comment #4) > > To make it more simply, Is replacing nullptr best? > > Yes, I think so. Okay. I'll change so. Created attachment 400836 [details]
Patch
Darin, thank you! Committed r262430: <https://trac.webkit.org/changeset/262430> All reviewed patches have been landed. Closing bug and clearing flags on attachment 400836 [details]. |