WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
212642
Pass nullptr for the 2nd argument of FileReaderLoader
https://bugs.webkit.org/show_bug.cgi?id=212642
Summary
Pass nullptr for the 2nd argument of FileReaderLoader
Tetsuharu Ohzeki [UTC+9]
Reported
2020-06-02 09:54:10 PDT
I seem this would make its constructor more clearly.
Attachments
Patch
(7.96 KB, patch)
2020-06-02 09:56 PDT
,
Tetsuharu Ohzeki [UTC+9]
no flags
Details
Formatted Diff
Diff
Patch
(2.83 KB, patch)
2020-06-02 10:33 PDT
,
Tetsuharu Ohzeki [UTC+9]
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Tetsuharu Ohzeki [UTC+9]
Comment 1
2020-06-02 09:56:07 PDT
Created
attachment 400832
[details]
Patch
Darin Adler
Comment 2
2020-06-02 10:02:05 PDT
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?
Darin Adler
Comment 3
2020-06-02 10:02:29 PDT
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".
Tetsuharu Ohzeki [UTC+9]
Comment 4
2020-06-02 10:18:46 PDT
(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?
Darin Adler
Comment 5
2020-06-02 10:19:31 PDT
(In reply to Tetsuharu Ohzeki from
comment #4
)
> To make it more simply, Is replacing nullptr best?
Yes, I think so.
Tetsuharu Ohzeki [UTC+9]
Comment 6
2020-06-02 10:22:00 PDT
(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.
Tetsuharu Ohzeki [UTC+9]
Comment 7
2020-06-02 10:33:00 PDT
Created
attachment 400836
[details]
Patch
Tetsuharu Ohzeki [UTC+9]
Comment 8
2020-06-02 10:34:11 PDT
Darin, thank you!
EWS
Comment 9
2020-06-02 11:10:58 PDT
Committed
r262430
: <
https://trac.webkit.org/changeset/262430
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 400836
[details]
.
Radar WebKit Bug Importer
Comment 10
2020-06-02 11:11:19 PDT
<
rdar://problem/63883364
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug