Clean up ExceptionCode enumeration
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 26 Jul 2017 02:34:56 +0000 (02:34 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 26 Jul 2017 02:34:56 +0000 (02:34 +0000)
commit3a069ea77cac5bd41d050e165867010cf8ecc1aa
treea5cd12c135b86e9ea27f2c8128da6f3ac5e0d193
parent5449a1f7936bebaaa10c7f917cfdee971f61ec47
Clean up ExceptionCode enumeration
https://bugs.webkit.org/show_bug.cgi?id=174812

Reviewed by Darin Adler.

Clean up ExceptionCode enumeration:
- Updated comments to reflect the latest WebIDL specification
- Drop special values given to some exception codes. Those legacy codes are already in the
  table inside DOMException.cpp. This also allows us to drop empty rows in the DOMException
  table
- Drop NoException value in the enumeration and use std::optional<ExceptionCode> when needed
  instead.

* Modules/indexeddb/shared/IDBError.cpp:
(WebCore::IDBError::IDBError):
(WebCore::IDBError::name):
(WebCore::IDBError::message):
* Modules/indexeddb/shared/IDBError.h:
(WebCore::IDBError::code):
(WebCore::IDBError::encode):
(WebCore::IDBError::decode):
* dom/DOMException.cpp:
* dom/ExceptionCode.h:
* fileapi/FileReaderSync.cpp:
(WebCore::errorCodeToException):
(WebCore::FileReaderSync::startLoading):
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::createRequest):
* xml/XMLHttpRequest.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219901 268f45cc-cd09-0410-ab3c-d52691b4dbfc
20 files changed:
Source/WebCore/ChangeLog
Source/WebCore/Modules/indexeddb/IDBRequest.cpp
Source/WebCore/Modules/indexeddb/IDBTransaction.cpp
Source/WebCore/Modules/indexeddb/server/IndexValueStore.cpp
Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.cpp
Source/WebCore/Modules/indexeddb/server/MemoryIndex.cpp
Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.cpp
Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp
Source/WebCore/Modules/indexeddb/server/SQLiteIDBTransaction.cpp
Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp
Source/WebCore/Modules/indexeddb/shared/IDBError.cpp
Source/WebCore/Modules/indexeddb/shared/IDBError.h
Source/WebCore/bindings/js/JSDOMExceptionHandling.cpp
Source/WebCore/dom/DOMException.cpp
Source/WebCore/dom/Exception.h
Source/WebCore/dom/ExceptionCode.h
Source/WebCore/fileapi/FileReaderSync.cpp
Source/WebCore/xml/XMLHttpRequest.cpp
Source/WebCore/xml/XMLHttpRequest.h
Source/WebKit/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp