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

Unified Diff: Source/core/dom/DOMCoreException.h

Issue 17379011: Make ExceptionCode be an enum that does not encode the "code" property (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 7 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
« no previous file with comments | « no previous file | Source/core/dom/DOMCoreException.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/DOMCoreException.h
diff --git a/Source/core/dom/DOMCoreException.h b/Source/core/dom/DOMCoreException.h
index 1a98c6e4b091d1d846d4e0eb29185743ca578fa0..77a94d1f7e8121016c9ed2733871499346d61420 100644
--- a/Source/core/dom/DOMCoreException.h
+++ b/Source/core/dom/DOMCoreException.h
@@ -34,6 +34,40 @@
namespace WebCore {
+// FIXME: This should be private once IDBDatabaseException is gone.
+enum {
+ IndexSizeErrorLegacyCode = 1,
+ HierarchyRequestErrorLegacyCode = 3,
+ WrongDocumentErrorLegacyCode = 4,
+ InvalidCharacterErrorLegacyCode = 5,
+ NoModificationAllowedErrorLegacyCode = 7,
+ NotFoundErrorLegacyCode = 8,
+ NotSupportedErrorLegacyCode = 9,
+ InuseAttributeErrorLegacyCode = 10, // Historical. Only used in setAttributeNode etc which have been removed from the DOM specs.
+
+ // Introduced in DOM Level 2:
+ InvalidStateErrorLegacyCode = 11,
+ SyntaxErrorLegacyCode = 12,
+ InvalidModificationErrorLegacyCode = 13,
+ NamespaceErrorLegacyCode = 14,
+ InvalidAccessErrorLegacyCode = 15,
+
+ // Introduced in DOM Level 3:
+ TypeMismatchErrorLegacyCode = 17, // Historical; use TypeError instead
+
+ // XMLHttpRequest extension:
+ SecurityErrorLegacyCode = 18,
+
+ // Others introduced in HTML5:
+ NetworkErrorLegacyCode = 19,
+ AbortErrorLegacyCode = 20,
+ UrlMismatchErrorLegacyCode = 21,
+ QuotaExceededErrorLegacyCode = 22,
+ TimeoutErrorLegacyCode = 23,
+ InvalidNodeTypeErrorLegacyCode = 24,
+ DataCloneErrorLegacyCode = 25
+};
+
class DOMCoreException : public ExceptionBase, public ScriptWrappable {
public:
static PassRefPtr<DOMCoreException> create(const ExceptionCodeDescription& description)
@@ -42,6 +76,7 @@ public:
}
static bool initializeDescription(ExceptionCode, ExceptionCodeDescription*);
+ static int getLegacyErrorCode(ExceptionCode);
private:
explicit DOMCoreException(const ExceptionCodeDescription& description)
« no previous file with comments | « no previous file | Source/core/dom/DOMCoreException.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698