Bug 213117 - Change FileReader.error to DOMException from obsoleted FileError
Summary: Change FileReader.error to DOMException from obsoleted FileError
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks: 213119
  Show dependency treegraph
 
Reported: 2020-06-12 02:25 PDT by Tetsuharu Ohzeki [UTC+9]
Modified: 2020-06-12 09:15 PDT (History)
9 users (show)

See Also:


Attachments
Patch (21.87 KB, patch)
2020-06-12 02:36 PDT, Tetsuharu Ohzeki [UTC+9]
no flags Details | Formatted Diff | Diff
Patch (22.21 KB, patch)
2020-06-12 04:08 PDT, Tetsuharu Ohzeki [UTC+9]
no flags Details | Formatted Diff | Diff
Patch (27.07 KB, patch)
2020-06-12 06:59 PDT, Tetsuharu Ohzeki [UTC+9]
no flags Details | Formatted Diff | Diff
Patch (26.96 KB, patch)
2020-06-12 08:37 PDT, Tetsuharu Ohzeki [UTC+9]
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>