Chromium Code Reviews| Index: third_party/WebKit/Source/core/fileapi/FileError.h |
| diff --git a/third_party/WebKit/Source/core/fileapi/FileError.h b/third_party/WebKit/Source/core/fileapi/FileError.h |
| index 0d9c65f3a10c9f57fa7913789269802de4b5c182..a3cef151117d4d6aeb015287774471e7c0e83796 100644 |
| --- a/third_party/WebKit/Source/core/fileapi/FileError.h |
| +++ b/third_party/WebKit/Source/core/fileapi/FileError.h |
| @@ -31,17 +31,24 @@ |
| #ifndef FileError_h |
| #define FileError_h |
| -#include "bindings/core/v8/ScriptWrappable.h" |
| #include "core/CoreExport.h" |
| -#include "core/dom/DOMError.h" |
| #include "platform/heap/Handle.h" |
| namespace blink { |
| +class DOMException; |
| class ExceptionState; |
| -class CORE_EXPORT FileError final : public DOMError { |
| - DEFINE_WRAPPERTYPEINFO(); |
| +// A FileError holds a return code (success or failure) from a FileAPI |
| +// or File System operation. |
| +// |
| +// FileError used to be a subclass of DOMError exposed via IDL to script, |
| +// but DOMException is now used instead, with instances created lazily |
| +// when thrown (from synchronous APIs) or assigned as `error` members |
| +// or passed to callbacks (for asynchronous APIs). |
| +// |
| +// TODO(jsbell): Eliminate this class, as it contains just one member. |
|
foolip
2016/06/08 10:04:44
What would it take to actually remove it?
|
| +class CORE_EXPORT FileError final : public GarbageCollected<FileError> { |
|
foolip
2016/06/08 10:04:44
Why does this need to be on the Oilpan heap? Can't
|
| public: |
| enum ErrorCode { |
| OK = 0, |
| @@ -78,7 +85,10 @@ public: |
| ErrorCode code() const { return m_code; } |
| + DEFINE_INLINE_TRACE() { } |
| + |
| static void throwDOMException(ExceptionState&, ErrorCode); |
| + static DOMException* createDOMException(ErrorCode); |
| private: |
| explicit FileError(ErrorCode); |