Need to implement FileError as defined in File API (http://www.w3.org/TR/2009/WD-FileAPI-20091117/#dfn-fileerror). This is needed by both FileReader and FileWriter.
Created attachment 53766 [details] Proposed Patch
Created attachment 53892 [details] Proposed Patch Added FileErrorConstructor to DOMWindow.
Is it possible to split the patch into modifying the code generators and adding a FileError object? I'd look at FileError, but there are others with much better understanding of generators...
Created attachment 54080 [details] Proposed Patch Moved code generator changes to a separate patch.
Comment on attachment 54080 [details] Proposed Patch r=me with 2 nits: diff --git a/WebCore/dom/ExceptionCode.h b/WebCore/dom/ExceptionCode.h + + // Introduced in File API: It'd be nice to have a link to a spec here as well. +#if ENABLE(FILE_READER) || ENABLE(FILE_WRITER) + NOT_READABLE_ERR = 24, + ENCODING_ERR = 26, +#endif diff --git a/WebCore/html/FileError.h b/WebCore/html/FileError.h +private: + FileError() : m_code(0) { } Initializer should be on a separate line.
Fixed and landed at http://trac.webkit.org/changeset/58194.
Hi, thanks for adding it. +class FileError : public RefCounted<FileError> { +public: + static PassRefPtr<FileError> create(ExceptionCode code) { return adoptRef(new FileError(code)); } +private: + FileError() : m_code(0) { } Don't we need a constructor that takes an ExceptionCode?
> Don't we need a constructor that takes an ExceptionCode? Yes, I noticed this when I turn on the feature during building FileReader. The fix is included in the patch for bug 38157. Thanks.