Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(312)

Unified Diff: third_party/WebKit/Source/core/fileapi/FileError.h

Issue 2040563002: Remove FileError interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fe-dep
Patch Set: Devtools/test updates Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);

Powered by Google App Engine
This is Rietveld 408576698