Summary: | Add FileError for File API | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Jian Li <jianli> | ||||||||
Component: | WebCore JavaScript | Assignee: | Jian Li <jianli> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | dimich, kinuko | ||||||||
Priority: | P2 | ||||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | All | ||||||||||
OS: | All | ||||||||||
Bug Depends on: | 37998 | ||||||||||
Bug Blocks: | |||||||||||
Attachments: |
|
Description
Jian Li
2010-04-19 19:30:21 PDT
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? |