Bug 213117

Summary: Change FileReader.error to DOMException from obsoleted FileError
Product: WebKit Reporter: Tetsuharu Ohzeki [UTC+9] <tetsuharu.ohzeki>
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: annulen, cdumez, esprehn+autocc, ews-watchlist, gyuyoung.kim, kondapallykalyan, ryuan.choi, sergio, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 213119    
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch none

Description Tetsuharu Ohzeki [UTC+9] 2020-06-12 02:25:10 PDT
By the spec https://w3c.github.io/FileAPI/, FileReader.error should be DOMException now.
Comment 1 Tetsuharu Ohzeki [UTC+9] 2020-06-12 02:36:22 PDT
Created attachment 401714 [details]
Patch
Comment 2 Tetsuharu Ohzeki [UTC+9] 2020-06-12 04:08:40 PDT
Created attachment 401719 [details]
Patch
Comment 3 Tetsuharu Ohzeki [UTC+9] 2020-06-12 06:59:40 PDT
Created attachment 401726 [details]
Patch

fix test expectations for wk1
Comment 4 Chris Dumez 2020-06-12 08:09:00 PDT
Comment on attachment 401726 [details]
Patch

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

r=me with changes.

> Source/WebCore/fileapi/FileReader.cpp:226
> +        RefPtr<DOMException> exception = DOMException::create(e.exception());

We don't need this local variable. This can be:
m_error = DOMException::create(e.exception());

> Source/WebCore/fileapi/FileReader.h:73
> +    RefPtr<DOMException> error() { return m_error; }

This should return a DOMException*, not need to ref:
DOMException* error() const { return m_error.get(); }

> Source/WebCore/fileapi/FileReader.idl:55
> +    readonly attribute DOMException error;

This should be:
readonly attribute DOMException? error;

As per spec, since it can return null.
Comment 5 Tetsuharu Ohzeki [UTC+9] 2020-06-12 08:37:20 PDT
Created attachment 401731 [details]
Patch

Thank you, Chris. I addressed your review in this patch. (I don't have a committer grant so I need to request the review to you again)
Comment 6 EWS 2020-06-12 09:14:48 PDT
Committed r262953: <https://trac.webkit.org/changeset/262953>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 401731 [details].
Comment 7 Radar WebKit Bug Importer 2020-06-12 09:15:17 PDT
<rdar://problem/64299522>