WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
47936
Renumber FileError/FileException error codes per latest File API spec changes
https://bugs.webkit.org/show_bug.cgi?id=47936
Summary
Renumber FileError/FileException error codes per latest File API spec changes
Kinuko Yasuda
Reported
2010-10-19 15:05:31 PDT
Renumber FileError/FileException error codes per latest File API spec changes
http://dev.w3.org/2006/webapi/FileAPI/#dfn-FileException
http://dev.w3.org/2009/dap/file-system/file-writer.html#the-fileerror-interface
http://dev.w3.org/2009/dap/file-system/file-dir-sys.html#the-fileerror-interface
const unsigned short NOT_FOUND_ERR = 1; const unsigned short SECURITY_ERR = 2; const unsigned short ABORT_ERR = 3; const unsigned short NOT_READABLE_ERR = 4; const unsigned short ENCODING_ERR = 5; const unsigned short NO_MODIFICATION_ALLOWED_ERR = 6; const unsigned short INVALID_STATE_ERR = 7; const unsigned short SYNTAX_ERR = 8; const unsigned short INVALID_MODIFICATION_ERR = 9; const unsigned short QUOTA_EXCEEDED_ERR = 10; const unsigned short TYPE_MISMATCH_ERR = 11; const unsigned short PATH_EXISTS_ERR = 12;
Attachments
Patch
(58.81 KB, patch)
2010-10-20 14:18 PDT
,
Kinuko Yasuda
no flags
Details
Formatted Diff
Diff
Patch
(62.12 KB, patch)
2010-10-20 21:39 PDT
,
Kinuko Yasuda
no flags
Details
Formatted Diff
Diff
Patch
(62.10 KB, patch)
2010-10-22 14:54 PDT
,
Kinuko Yasuda
jianli
: review+
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Kinuko Yasuda
Comment 1
2010-10-20 14:18:51 PDT
Created
attachment 71336
[details]
Patch
Jian Li
Comment 2
2010-10-20 18:31:33 PDT
Comment on
attachment 71336
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=71336&action=review
> LayoutTests/ChangeLog:11 > + * fast/files/read-file-async-expected.txt:
You'd better also update fast/files/workers/read-*-async-expected.txt though worker tests are skipped now.
> WebCore/dom/ExceptionCode.cpp:197 > + "A requested file or directory could not be found at the time an operation was processed.",
Where did you get the message?
> WebCore/fileapi/FileError.h:43 > + enum FileErrorCode {
Probably it is simpler to name it as ErrorCode as in PositionError.h or GeolocationError.h.
> WebCore/fileapi/FileException.h:65 > + static int FileErrorCodeToExceptionCode(int fileErrorCode)
Probably simpler to call it as ErrorCodeToExceptionCode.
Kinuko Yasuda
Comment 3
2010-10-20 21:39:33 PDT
Created
attachment 71386
[details]
Patch
Kinuko Yasuda
Comment 4
2010-10-20 21:48:31 PDT
Comment on
attachment 71336
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=71336&action=review
>> LayoutTests/ChangeLog:11 >> + * fast/files/read-file-async-expected.txt: > > You'd better also update fast/files/workers/read-*-async-expected.txt though worker tests are skipped now.
Done.
>> WebCore/dom/ExceptionCode.cpp:197 >> + "A requested file or directory could not be found at the time an operation was processed.", > > Where did you get the message?
Basically I copy-pasted those messages from the spec (plus some minor modifications to make them look alike). For this particular one it's from FileSystem spec, 7.3 Error Code Descriptions.
http://dev.w3.org/2009/dap/file-system/file-dir-sys.html#error-code-descriptions
Please feel free to correct the sentences if they look weird or not relevant.
>> WebCore/fileapi/FileError.h:43 >> + enum FileErrorCode { > > Probably it is simpler to name it as ErrorCode as in PositionError.h or GeolocationError.h.
Fixed.
>> WebCore/fileapi/FileException.h:65 >> + static int FileErrorCodeToExceptionCode(int fileErrorCode) > > Probably simpler to call it as ErrorCodeToExceptionCode.
Fixed.
Jian Li
Comment 5
2010-10-21 18:31:26 PDT
Comment on
attachment 71386
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=71386&action=review
> WebCore/dom/ExceptionCode.cpp:204 > + "An attempt was made to supply an invalid line ending specifier to the API. ",
This description text seems to be too specific.
Kinuko Yasuda
Comment 6
2010-10-21 19:38:49 PDT
(In reply to
comment #5
)
> (From update of
attachment 71386
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=71386&action=review
> > > WebCore/dom/ExceptionCode.cpp:204 > > + "An attempt was made to supply an invalid line ending specifier to the API. ", > > This description text seems to be too specific.
Do you have any alternative suggestions? It's the only case where useragent should fire SYNTAX_ERR in the entire File API spec and I don't see the strong reason to change it now.
Jian Li
Comment 7
2010-10-22 10:32:13 PDT
(In reply to
comment #6
)
> (In reply to
comment #5
) > > (From update of
attachment 71386
[details]
[details]) > > View in context:
https://bugs.webkit.org/attachment.cgi?id=71386&action=review
> > > > > WebCore/dom/ExceptionCode.cpp:204 > > > + "An attempt was made to supply an invalid line ending specifier to the API. ", > > > > This description text seems to be too specific. > > Do you have any alternative suggestions? > > It's the only case where useragent should fire SYNTAX_ERR in the entire File API spec and I don't see the strong reason to change it now.
Though it is only used in one particular case, I am afraid that it might be used in other cases without updating the original description. How about something like: "Invalid or unsupported argument, like invalid line ending specifier."
Kinuko Yasuda
Comment 8
2010-10-22 14:54:07 PDT
Created
attachment 71597
[details]
Patch
Kinuko Yasuda
Comment 9
2010-10-22 14:56:16 PDT
(In reply to
comment #7
)
> (In reply to
comment #6
) > > (In reply to
comment #5
) > > > (From update of
attachment 71386
[details]
[details] [details]) > > > View in context:
https://bugs.webkit.org/attachment.cgi?id=71386&action=review
> > > > > > > WebCore/dom/ExceptionCode.cpp:204 > > > > + "An attempt was made to supply an invalid line ending specifier to the API. ", > > > > > > This description text seems to be too specific. > > > > Do you have any alternative suggestions? > > > > It's the only case where useragent should fire SYNTAX_ERR in the entire File API spec and I don't see the strong reason to change it now. > > Though it is only used in one particular case, I am afraid that it might be used in other cases without updating the original description. How about something like: > "Invalid or unsupported argument, like invalid line ending specifier."
Sounds good, updated the patch.
Kinuko Yasuda
Comment 10
2010-10-24 22:54:38 PDT
Committed
r70438
: <
http://trac.webkit.org/changeset/70438
>
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