Diff
Modified: trunk/Source/WebCore/CMakeLists.txt (219729 => 219730)
--- trunk/Source/WebCore/CMakeLists.txt 2017-07-21 16:34:49 UTC (rev 219729)
+++ trunk/Source/WebCore/CMakeLists.txt 2017-07-21 16:35:32 UTC (rev 219730)
@@ -426,8 +426,8 @@
dom/CompositionEvent.idl
dom/CustomElementRegistry.idl
dom/CustomEvent.idl
- dom/DOMCoreException.idl
dom/DOMError.idl
+ dom/DOMException.idl
dom/DOMImplementation.idl
dom/DOMNamedFlowCollection.idl
dom/DOMPoint.idl
@@ -1488,8 +1488,8 @@
dom/CustomElementReactionQueue.cpp
dom/CustomElementRegistry.cpp
dom/CustomEvent.cpp
- dom/DOMCoreException.cpp
dom/DOMError.cpp
+ dom/DOMException.cpp
dom/DOMImplementation.cpp
dom/DOMNamedFlowCollection.cpp
dom/DOMPointReadOnly.cpp
Modified: trunk/Source/WebCore/ChangeLog (219729 => 219730)
--- trunk/Source/WebCore/ChangeLog 2017-07-21 16:34:49 UTC (rev 219729)
+++ trunk/Source/WebCore/ChangeLog 2017-07-21 16:35:32 UTC (rev 219730)
@@ -1,3 +1,40 @@
+2017-07-21 Chris Dumez <[email protected]>
+
+ Rename DOMCoreException class to DOMException
+ https://bugs.webkit.org/show_bug.cgi?id=174698
+
+ Reviewed by Darin Adler.
+
+ Rename DOMCoreException class to DOMException to match its Web-exposed name.
+
+ * CMakeLists.txt:
+ * DerivedSources.cpp:
+ * DerivedSources.make:
+ * Modules/quota/StorageErrorCallback.cpp:
+ (WebCore::StorageErrorCallback::CallbackTask::CallbackTask):
+ * Modules/quota/StorageErrorCallback.h:
+ * Modules/quota/StorageErrorCallback.idl:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/JSDOMExceptionHandling.cpp:
+ (WebCore::retrieveErrorMessage):
+ (WebCore::createDOMException):
+ * bindings/scripts/CodeGeneratorJS.pm:
+ (GenerateOverloadDispatcher):
+ * css/FontFaceSet.cpp:
+ * css/FontFaceSet.h:
+ * dom/DOMAllInOne.cpp:
+ * dom/DOMException.cpp: Renamed from Source/WebCore/dom/DOMCoreException.cpp.
+ (WebCore::DOMException::create):
+ (WebCore::DOMException::DOMException):
+ (WebCore::DOMException::initializeDescription):
+ * dom/DOMException.h: Renamed from Source/WebCore/dom/DOMCoreException.h.
+ (WebCore::DOMException::create):
+ (WebCore::DOMException::DOMException):
+ * dom/DOMException.idl: Renamed from Source/WebCore/dom/DOMCoreException.idl.
+ * dom/DOMExceptions.in:
+ * dom/make_dom_exceptions.pl:
+ (generateImplementation):
+
2017-07-21 Sam Weinig <[email protected]>
Follow up to https://bugs.webkit.org/show_bug.cgi?id=174659.
Modified: trunk/Source/WebCore/DerivedSources.cpp (219729 => 219730)
--- trunk/Source/WebCore/DerivedSources.cpp 2017-07-21 16:34:49 UTC (rev 219729)
+++ trunk/Source/WebCore/DerivedSources.cpp 2017-07-21 16:35:32 UTC (rev 219730)
@@ -156,8 +156,8 @@
#include "JSDocumentType.cpp"
#include "JSDOMApplicationCache.cpp"
#include "JSDOMCSSNamespace.cpp"
-#include "JSDOMCoreException.cpp"
#include "JSDOMError.cpp"
+#include "JSDOMException.cpp"
#include "JSDOMFormData.cpp"
#include "JSDOMImplementation.cpp"
#include "JSDOMMimeType.cpp"
Modified: trunk/Source/WebCore/DerivedSources.make (219729 => 219730)
--- trunk/Source/WebCore/DerivedSources.make 2017-07-21 16:34:49 UTC (rev 219729)
+++ trunk/Source/WebCore/DerivedSources.make 2017-07-21 16:35:32 UTC (rev 219730)
@@ -356,8 +356,8 @@
$(WebCore)/dom/CompositionEvent.idl \
$(WebCore)/dom/CustomElementRegistry.idl \
$(WebCore)/dom/CustomEvent.idl \
- $(WebCore)/dom/DOMCoreException.idl \
$(WebCore)/dom/DOMError.idl \
+ $(WebCore)/dom/DOMException.idl \
$(WebCore)/dom/DOMImplementation.idl \
$(WebCore)/dom/DOMNamedFlowCollection.idl \
$(WebCore)/dom/DOMPoint.idl \
Modified: trunk/Source/WebCore/Modules/quota/StorageErrorCallback.cpp (219729 => 219730)
--- trunk/Source/WebCore/Modules/quota/StorageErrorCallback.cpp 2017-07-21 16:34:49 UTC (rev 219729)
+++ trunk/Source/WebCore/Modules/quota/StorageErrorCallback.cpp 2017-07-21 16:35:32 UTC (rev 219730)
@@ -34,7 +34,7 @@
#include "StorageErrorCallback.h"
-#include "DOMCoreException.h"
+#include "DOMException.h"
#include "ExceptionCodeDescription.h"
namespace WebCore {
@@ -42,7 +42,7 @@
StorageErrorCallback::CallbackTask::CallbackTask(RefPtr<StorageErrorCallback>&& callback, ExceptionCode ec)
: ScriptExecutionContext::Task([callback, ec] (ScriptExecutionContext*) {
if (callback)
- callback->handleEvent(DOMCoreException::create(ExceptionCodeDescription(ec)).get());
+ callback->handleEvent(DOMException::create(ExceptionCodeDescription(ec)).get());
})
{
}
Modified: trunk/Source/WebCore/Modules/quota/StorageErrorCallback.h (219729 => 219730)
--- trunk/Source/WebCore/Modules/quota/StorageErrorCallback.h 2017-07-21 16:34:49 UTC (rev 219729)
+++ trunk/Source/WebCore/Modules/quota/StorageErrorCallback.h 2017-07-21 16:35:32 UTC (rev 219730)
@@ -37,7 +37,7 @@
namespace WebCore {
-class DOMCoreException;
+class DOMException;
typedef int ExceptionCode;
@@ -44,7 +44,7 @@
class StorageErrorCallback : public RefCounted<StorageErrorCallback> {
public:
virtual ~StorageErrorCallback() { }
- virtual bool handleEvent(DOMCoreException*) = 0;
+ virtual bool handleEvent(DOMException*) = 0;
class CallbackTask : public ScriptExecutionContext::Task {
public:
Modified: trunk/Source/WebCore/Modules/quota/StorageErrorCallback.idl (219729 => 219730)
--- trunk/Source/WebCore/Modules/quota/StorageErrorCallback.idl 2017-07-21 16:34:49 UTC (rev 219729)
+++ trunk/Source/WebCore/Modules/quota/StorageErrorCallback.idl 2017-07-21 16:35:32 UTC (rev 219730)
@@ -30,4 +30,4 @@
[
Conditional=QUOTA,
-] callback StorageErrorCallback = void (DOMCoreException error);
+] callback StorageErrorCallback = void (DOMException error);
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (219729 => 219730)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2017-07-21 16:34:49 UTC (rev 219729)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2017-07-21 16:35:32 UTC (rev 219730)
@@ -4084,7 +4084,7 @@
977E2E0F12F0FC9C00C13380 /* XSSAuditorDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 977E2E0C12F0FC9C00C13380 /* XSSAuditorDelegate.h */; };
978AD67414130A8D00C7CAE3 /* HTMLSpanElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 978AD67114130A8D00C7CAE3 /* HTMLSpanElement.cpp */; };
978AD67514130A8D00C7CAE3 /* HTMLSpanElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 978AD67214130A8D00C7CAE3 /* HTMLSpanElement.h */; };
- 978D07BE145A0F6C0096908D /* DOMCoreException.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 978D07BD145A0F6C0096908D /* DOMCoreException.cpp */; };
+ 978D07BE145A0F6C0096908D /* DOMException.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 978D07BD145A0F6C0096908D /* DOMException.cpp */; };
979F43D31075E44A0000F83B /* NavigationScheduler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 979F43D11075E44A0000F83B /* NavigationScheduler.cpp */; };
979F43D41075E44A0000F83B /* NavigationScheduler.h in Headers */ = {isa = PBXBuildFile; fileRef = 979F43D21075E44A0000F83B /* NavigationScheduler.h */; settings = {ATTRIBUTES = (Private, ); }; };
97AA3CA5145237CC003E1DA6 /* EventTargetHeaders.h in Headers */ = {isa = PBXBuildFile; fileRef = 97AA3CA3145237CC003E1DA6 /* EventTargetHeaders.h */; };
@@ -5682,9 +5682,9 @@
BC6049CC0DB560C200204739 /* CSSCanvasValue.h in Headers */ = {isa = PBXBuildFile; fileRef = BC6049CB0DB560C200204739 /* CSSCanvasValue.h */; };
BC604A430DB5634E00204739 /* CSSCanvasValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC604A420DB5634E00204739 /* CSSCanvasValue.cpp */; };
BC6090200E91B8EC000C68B5 /* JSEventTargetCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC60901E0E91B8EC000C68B5 /* JSEventTargetCustom.cpp */; };
- BC60D6E90D28D83400B9918F /* DOMCoreException.h in Headers */ = {isa = PBXBuildFile; fileRef = BC60D6E80D28D83400B9918F /* DOMCoreException.h */; };
- BC60D7C00D29A46300B9918F /* JSDOMCoreException.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC60D7BE0D29A46300B9918F /* JSDOMCoreException.cpp */; };
- BC60D7C10D29A46300B9918F /* JSDOMCoreException.h in Headers */ = {isa = PBXBuildFile; fileRef = BC60D7BF0D29A46300B9918F /* JSDOMCoreException.h */; };
+ BC60D6E90D28D83400B9918F /* DOMException.h in Headers */ = {isa = PBXBuildFile; fileRef = BC60D6E80D28D83400B9918F /* DOMException.h */; };
+ BC60D7C00D29A46300B9918F /* JSDOMException.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC60D7BE0D29A46300B9918F /* JSDOMException.cpp */; };
+ BC60D7C10D29A46300B9918F /* JSDOMException.h in Headers */ = {isa = PBXBuildFile; fileRef = BC60D7BF0D29A46300B9918F /* JSDOMException.h */; };
BC60D8F20D2A11E000B9918F /* ExceptionBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC60D8F00D2A11E000B9918F /* ExceptionBase.cpp */; };
BC60D8F30D2A11E000B9918F /* ExceptionBase.h in Headers */ = {isa = PBXBuildFile; fileRef = BC60D8F10D2A11E000B9918F /* ExceptionBase.h */; settings = {ATTRIBUTES = (Private, ); }; };
BC64640A11D7F304006455B0 /* DOMStringMap.h in Headers */ = {isa = PBXBuildFile; fileRef = BC64640811D7F304006455B0 /* DOMStringMap.h */; };
@@ -12248,7 +12248,7 @@
978AD67114130A8D00C7CAE3 /* HTMLSpanElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLSpanElement.cpp; sourceTree = "<group>"; };
978AD67214130A8D00C7CAE3 /* HTMLSpanElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLSpanElement.h; sourceTree = "<group>"; };
978AD67314130A8D00C7CAE3 /* HTMLSpanElement.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = HTMLSpanElement.idl; sourceTree = "<group>"; };
- 978D07BD145A0F6C0096908D /* DOMCoreException.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DOMCoreException.cpp; sourceTree = "<group>"; };
+ 978D07BD145A0F6C0096908D /* DOMException.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DOMException.cpp; sourceTree = "<group>"; };
979F43D11075E44A0000F83B /* NavigationScheduler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NavigationScheduler.cpp; sourceTree = "<group>"; };
979F43D21075E44A0000F83B /* NavigationScheduler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NavigationScheduler.h; sourceTree = "<group>"; };
97AA3CA3145237CC003E1DA6 /* EventTargetHeaders.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EventTargetHeaders.h; sourceTree = "<group>"; };
@@ -14134,10 +14134,10 @@
BC6049CB0DB560C200204739 /* CSSCanvasValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSCanvasValue.h; sourceTree = "<group>"; };
BC604A420DB5634E00204739 /* CSSCanvasValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CSSCanvasValue.cpp; sourceTree = "<group>"; };
BC60901E0E91B8EC000C68B5 /* JSEventTargetCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSEventTargetCustom.cpp; sourceTree = "<group>"; };
- BC60D6E80D28D83400B9918F /* DOMCoreException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMCoreException.h; sourceTree = "<group>"; };
- BC60D6EB0D28D99900B9918F /* DOMCoreException.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DOMCoreException.idl; sourceTree = "<group>"; };
- BC60D7BE0D29A46300B9918F /* JSDOMCoreException.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMCoreException.cpp; sourceTree = "<group>"; };
- BC60D7BF0D29A46300B9918F /* JSDOMCoreException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMCoreException.h; sourceTree = "<group>"; };
+ BC60D6E80D28D83400B9918F /* DOMException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMException.h; sourceTree = "<group>"; };
+ BC60D6EB0D28D99900B9918F /* DOMException.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DOMException.idl; sourceTree = "<group>"; };
+ BC60D7BE0D29A46300B9918F /* JSDOMException.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMException.cpp; sourceTree = "<group>"; };
+ BC60D7BF0D29A46300B9918F /* JSDOMException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMException.h; sourceTree = "<group>"; };
BC60D8F00D2A11E000B9918F /* ExceptionBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ExceptionBase.cpp; sourceTree = "<group>"; };
BC60D8F10D2A11E000B9918F /* ExceptionBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExceptionBase.h; sourceTree = "<group>"; };
BC64640811D7F304006455B0 /* DOMStringMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMStringMap.h; sourceTree = "<group>"; };
@@ -21992,8 +21992,8 @@
1A494EDD0A123F4C00FDAFC1 /* JSDocumentFragment.h */,
65DF31E109D1CC60000BE325 /* JSDocumentType.cpp */,
65DF31E209D1CC60000BE325 /* JSDocumentType.h */,
- BC60D7BE0D29A46300B9918F /* JSDOMCoreException.cpp */,
- BC60D7BF0D29A46300B9918F /* JSDOMCoreException.h */,
+ BC60D7BE0D29A46300B9918F /* JSDOMException.cpp */,
+ BC60D7BF0D29A46300B9918F /* JSDOMException.h */,
65DF31E309D1CC60000BE325 /* JSDOMImplementation.cpp */,
65DF31E409D1CC60000BE325 /* JSDOMImplementation.h */,
52CCA9E015E3F62C0053C77F /* JSDOMNamedFlowCollection.cpp */,
@@ -25604,9 +25604,9 @@
A8185F3209765765005826D9 /* DocumentType.cpp */,
A8185F3109765765005826D9 /* DocumentType.h */,
93EEC1E809C2877700C515D1 /* DocumentType.idl */,
- 978D07BD145A0F6C0096908D /* DOMCoreException.cpp */,
- BC60D6E80D28D83400B9918F /* DOMCoreException.h */,
- BC60D6EB0D28D99900B9918F /* DOMCoreException.idl */,
+ 978D07BD145A0F6C0096908D /* DOMException.cpp */,
+ BC60D6E80D28D83400B9918F /* DOMException.h */,
+ BC60D6EB0D28D99900B9918F /* DOMException.idl */,
BC1BDF20156C17A9001C1243 /* DOMError.cpp */,
BC1BDF21156C17A9001C1243 /* DOMError.h */,
BC1BDF22156C17A9001C1243 /* DOMError.idl */,
@@ -27069,7 +27069,7 @@
A8185F3909765766005826D9 /* DocumentType.h in Headers */,
973889A1116EA9DC00ADF313 /* DocumentWriter.h in Headers */,
1A8F6BC30DB55CDC001DB794 /* DOMApplicationCache.h in Headers */,
- BC60D6E90D28D83400B9918F /* DOMCoreException.h in Headers */,
+ BC60D6E90D28D83400B9918F /* DOMException.h in Headers */,
FC9A0F75164094CF003D6B8D /* DOMCSSNamespace.h in Headers */,
9B3A8872145632F9003AE8F5 /* DOMDOMSettableTokenList.h in Headers */,
7AABA25A14BC613300AA9A11 /* DOMEditor.h in Headers */,
@@ -27842,7 +27842,7 @@
7C8E34C51E4A33B00054CE23 /* JSDOMConvertVariadic.h in Headers */,
7C8E34C61E4A33B00054CE23 /* JSDOMConvertWebGL.h in Headers */,
7C8E34C71E4A33B00054CE23 /* JSDOMConvertXPathNSResolver.h in Headers */,
- BC60D7C10D29A46300B9918F /* JSDOMCoreException.h in Headers */,
+ BC60D7C10D29A46300B9918F /* JSDOMException.h in Headers */,
FC9E0E4D16419C1E00392BE3 /* JSDOMCSSNamespace.h in Headers */,
40ECAE7E16B8B67200C36103 /* JSDOMError.h in Headers */,
7C45C9D61E3FCBF800AAB558 /* JSDOMExceptionHandling.h in Headers */,
@@ -31091,7 +31091,7 @@
A8185F3A09765766005826D9 /* DocumentType.cpp in Sources */,
973889A0116EA9DC00ADF313 /* DocumentWriter.cpp in Sources */,
1A8F6BC20DB55CDC001DB794 /* DOMApplicationCache.cpp in Sources */,
- 978D07BE145A0F6C0096908D /* DOMCoreException.cpp in Sources */,
+ 978D07BE145A0F6C0096908D /* DOMException.cpp in Sources */,
FD677738195CAF3D0072E0D3 /* DOMCSSNamespace.cpp in Sources */,
7AABA25914BC613300AA9A11 /* DOMEditor.cpp in Sources */,
BC1BDF24156C1883001C1243 /* DOMError.cpp in Sources */,
@@ -31804,7 +31804,7 @@
7C8E34B21E4A33B00054CE23 /* JSDOMConvertDate.cpp in Sources */,
7C8E34BC1E4A33B00054CE23 /* JSDOMConvertNumbers.cpp in Sources */,
7C8E34C21E4A33B00054CE23 /* JSDOMConvertStrings.cpp in Sources */,
- BC60D7C00D29A46300B9918F /* JSDOMCoreException.cpp in Sources */,
+ BC60D7C00D29A46300B9918F /* JSDOMException.cpp in Sources */,
FD67773B195CB1E60072E0D3 /* JSDOMCSSNamespace.cpp in Sources */,
40ECAE8116B8B68A00C36103 /* JSDOMError.cpp in Sources */,
7C45C9D21E3EFE0800AAB558 /* JSDOMExceptionHandling.cpp in Sources */,
Modified: trunk/Source/WebCore/bindings/js/JSDOMExceptionHandling.cpp (219729 => 219730)
--- trunk/Source/WebCore/bindings/js/JSDOMExceptionHandling.cpp 2017-07-21 16:34:49 UTC (rev 219729)
+++ trunk/Source/WebCore/bindings/js/JSDOMExceptionHandling.cpp 2017-07-21 16:35:32 UTC (rev 219730)
@@ -62,7 +62,7 @@
String retrieveErrorMessage(ExecState& state, VM& vm, JSValue exception, CatchScope& catchScope)
{
- if (auto* domException = JSDOMCoreException::toWrapped(vm, exception))
+ if (auto* domException = JSDOMException::toWrapped(vm, exception))
return domException->toString();
// FIXME: <http://webkit.org/b/115087> Web Inspector: WebCore::reportException should not evaluate _javascript_ handling exceptions
@@ -168,11 +168,11 @@
JSValue errorObject;
switch (description.type) {
- case DOMCoreExceptionType:
+ case DOMExceptionType:
#if ENABLE(INDEXED_DATABASE)
case IDBDatabaseExceptionType:
#endif
- errorObject = toJS(exec, globalObject, DOMCoreException::create(description));
+ errorObject = toJS(exec, globalObject, DOMException::create(description));
break;
}
Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (219729 => 219730)
--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm 2017-07-21 16:34:49 UTC (rev 219729)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm 2017-07-21 16:35:32 UTC (rev 219730)
@@ -3368,7 +3368,7 @@
}
$overload = GetOverloadThatMatches($S, $d, \&$isObjectOrErrorOrDOMExceptionParameter);
- &$generateOverloadCallIfNecessary($overload, "distinguishingArg.isObject() && asObject(distinguishingArg)->inherits(vm, JSDOMCoreException::info())");
+ &$generateOverloadCallIfNecessary($overload, "distinguishingArg.isObject() && asObject(distinguishingArg)->inherits(vm, JSDOMException::info())");
$overload = GetOverloadThatMatches($S, $d, \&$isObjectOrErrorParameter);
&$generateOverloadCallIfNecessary($overload, "distinguishingArg.isObject() && asObject(distinguishingArg)->type() == ErrorInstanceType");
Modified: trunk/Source/WebCore/css/FontFaceSet.cpp (219729 => 219730)
--- trunk/Source/WebCore/css/FontFaceSet.cpp 2017-07-21 16:34:49 UTC (rev 219729)
+++ trunk/Source/WebCore/css/FontFaceSet.cpp 2017-07-21 16:35:32 UTC (rev 219730)
@@ -30,7 +30,6 @@
#include "ExceptionCodeDescription.h"
#include "FontFace.h"
#include "JSDOMBinding.h"
-#include "JSDOMCoreException.h"
#include "JSFontFace.h"
#include "JSFontFaceSet.h"
Modified: trunk/Source/WebCore/css/FontFaceSet.h (219729 => 219730)
--- trunk/Source/WebCore/css/FontFaceSet.h 2017-07-21 16:34:49 UTC (rev 219729)
+++ trunk/Source/WebCore/css/FontFaceSet.h 2017-07-21 16:35:32 UTC (rev 219730)
@@ -32,7 +32,7 @@
namespace WebCore {
-class DOMCoreException;
+class DOMException;
class FontFaceSet final : public RefCounted<FontFaceSet>, private CSSFontFaceSetClient, public EventTargetWithInlineData, private ActiveDOMObject {
public:
Modified: trunk/Source/WebCore/dom/DOMAllInOne.cpp (219729 => 219730)
--- trunk/Source/WebCore/dom/DOMAllInOne.cpp 2017-07-21 16:34:49 UTC (rev 219729)
+++ trunk/Source/WebCore/dom/DOMAllInOne.cpp 2017-07-21 16:35:32 UTC (rev 219730)
@@ -46,8 +46,8 @@
#include "ContainerNodeAlgorithms.cpp"
#include "ContextDestructionObserver.cpp"
#include "CustomEvent.cpp"
-#include "DOMCoreException.cpp"
#include "DOMError.cpp"
+#include "DOMException.cpp"
#include "DOMImplementation.cpp"
#include "DOMNamedFlowCollection.cpp"
#include "DOMStringList.cpp"
Deleted: trunk/Source/WebCore/dom/DOMCoreException.cpp (219729 => 219730)
--- trunk/Source/WebCore/dom/DOMCoreException.cpp 2017-07-21 16:34:49 UTC (rev 219729)
+++ trunk/Source/WebCore/dom/DOMCoreException.cpp 2017-07-21 16:35:32 UTC (rev 219730)
@@ -1,114 +0,0 @@
-/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Apple Inc. ("Apple") nor the names of
- * its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY GOOGLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "DOMCoreException.h"
-
-#include "ExceptionCode.h"
-#include "ExceptionCodeDescription.h"
-
-namespace WebCore {
-
-// http://heycam.github.io/webidl/#idl-DOMException-error-names
-static const struct CoreException {
- const char* const name;
- const char* const description;
- ExceptionCode code;
-} coreExceptions[] = {
- { "IndexSizeError", "The index is not in the allowed range.", 1 },
- { nullptr, nullptr, 0 }, // DOMStringSizeError
- { "HierarchyRequestError", "The operation would yield an incorrect node tree.", 3 },
- { "WrongDocumentError", "The object is in the wrong document.", 4 },
- { "InvalidCharacterError", "The string contains invalid characters.", 5 },
- { nullptr, nullptr, 0 }, // NoDataAllowedError
- { "NoModificationAllowedError", "The object can not be modified.", 7 },
- { "NotFoundError", "The object can not be found here.", 8 },
- { "NotSupportedError", "The operation is not supported.", 9 },
- { "InUseAttributeError", "The attribute is in use.", 10 },
- { "InvalidStateError", "The object is in an invalid state.", 11 },
- { "SyntaxError", "The string did not match the expected pattern.", 12 },
- { "InvalidModificationError", " The object can not be modified in this way.", 13 },
- { "NamespaceError", "The operation is not allowed by Namespaces in XML.", 14 },
- { "InvalidAccessError", "The object does not support the operation or argument.", 15 },
- { nullptr, nullptr, 0 }, // ValidationError
- { "TypeMismatchError", "The type of an object was incompatible with the expected type of the parameter associated to the object.", 17 },
- { "SecurityError", "The operation is insecure.", 18 },
- { "NetworkError", " A network error occurred.", 19 },
- { "AbortError", "The operation was aborted.", 20 },
- { "URLMismatchError", "The given URL does not match another URL.", 21 },
- { "QuotaExceededError", "The quota has been exceeded.", 22 },
- { "TimeoutError", "The operation timed out.", 23 },
- { "InvalidNodeTypeError", "The supplied node is incorrect or has an incorrect ancestor for this operation.", 24 },
- { "DataCloneError", "The object can not be cloned.", 25 },
- { "EncodingError", "The encoding operation (either encoded or decoding) failed.", 0 },
- { "NotReadableError", "The I/O read operation failed.", 0 },
- { "UnknownError", "The operation failed for an unknown transient reason (e.g. out of memory).", 0 },
- { "ConstraintError", "A mutation operation in a transaction failed because a constraint was not satisfied.", 0 },
- { "DataError", "Provided data is inadequate.", 0 },
- { "TransactionInactiveError", "A request was placed against a transaction which is currently not active, or which is finished.", 0 },
- { "ReadOnlyError", "The mutating operation was attempted in a \"readonly\" transaction.", 0 },
- { "VersionError", "An attempt was made to open a database using a lower version than the existing version.", 0 },
- { "OperationError", "The operation failed for an operation-specific reason.", 0 },
- { "NotAllowedError", "The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission.", 0 }
-};
-
-static ExceptionCode errorCodeFromName(const String& name)
-{
- for (auto& entry : coreExceptions) {
- if (entry.name == name)
- return entry.code;
- }
- return 0;
-}
-
-Ref<DOMCoreException> DOMCoreException::create(const String& message, const String& name)
-{
- return adoptRef(*new DOMCoreException(errorCodeFromName(name), message, name));
-}
-
-DOMCoreException::DOMCoreException(ExceptionCode ec, const String& message, const String& name)
- : ExceptionBase(ec, name, message, ASCIILiteral("DOM"))
-{
-}
-
-bool DOMCoreException::initializeDescription(ExceptionCode ec, ExceptionCodeDescription* description)
-{
- description->typeName = "DOM";
- description->code = ec;
- description->type = DOMCoreExceptionType;
-
- size_t tableSize = WTF_ARRAY_LENGTH(coreExceptions);
- size_t tableIndex = ec - INDEX_SIZE_ERR;
-
- description->name = tableIndex < tableSize ? coreExceptions[tableIndex].name : 0;
- description->description = tableIndex < tableSize ? coreExceptions[tableIndex].description : 0;
-
- return true;
-}
-
-} // namespace WebCore
Deleted: trunk/Source/WebCore/dom/DOMCoreException.h (219729 => 219730)
--- trunk/Source/WebCore/dom/DOMCoreException.h 2017-07-21 16:34:49 UTC (rev 219729)
+++ trunk/Source/WebCore/dom/DOMCoreException.h 2017-07-21 16:35:32 UTC (rev 219730)
@@ -1,53 +0,0 @@
-/*
- * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Apple Inc. ("Apple") nor the names of
- * its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#pragma once
-
-#include "ExceptionBase.h"
-
-namespace WebCore {
-
-class DOMCoreException : public ExceptionBase {
-public:
- static Ref<DOMCoreException> create(const ExceptionCodeDescription& description)
- {
- return adoptRef(*new DOMCoreException(description));
- }
- static Ref<DOMCoreException> create(const String& message, const String& name);
-
- static bool initializeDescription(ExceptionCode, ExceptionCodeDescription*);
-
-protected:
- DOMCoreException(ExceptionCode, const String& message, const String& name);
- explicit DOMCoreException(const ExceptionCodeDescription& description)
- : ExceptionBase(description)
- {
- }
-};
-
-} // namespace WebCore
Deleted: trunk/Source/WebCore/dom/DOMCoreException.idl (219729 => 219730)
--- trunk/Source/WebCore/dom/DOMCoreException.idl 2017-07-21 16:34:49 UTC (rev 219729)
+++ trunk/Source/WebCore/dom/DOMCoreException.idl 2017-07-21 16:35:32 UTC (rev 219730)
@@ -1,67 +0,0 @@
-/*
- * Copyright (C) 2007 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Apple Inc. ("Apple") nor the names of
- * its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-[
- Constructor(optional DOMString message = "", optional DOMString name = "Error"),
- DoNotCheckConstants,
- Exposed=(Window,Worker),
- InterfaceName=DOMException,
- ImplementationLacksVTable,
-] exception DOMCoreException {
-
- readonly attribute unsigned short code;
- readonly attribute DOMString name;
- readonly attribute DOMString message;
-
- // ExceptionCode
- const unsigned short INDEX_SIZE_ERR = 1;
- const unsigned short DOMSTRING_SIZE_ERR = 2;
- const unsigned short HIERARCHY_REQUEST_ERR = 3;
- const unsigned short WRONG_DOCUMENT_ERR = 4;
- const unsigned short INVALID_CHARACTER_ERR = 5;
- const unsigned short NO_DATA_ALLOWED_ERR = 6;
- const unsigned short NO_MODIFICATION_ALLOWED_ERR = 7;
- const unsigned short NOT_FOUND_ERR = 8;
- const unsigned short NOT_SUPPORTED_ERR = 9;
- const unsigned short INUSE_ATTRIBUTE_ERR = 10;
- const unsigned short INVALID_STATE_ERR = 11;
- const unsigned short SYNTAX_ERR = 12;
- const unsigned short INVALID_MODIFICATION_ERR = 13;
- const unsigned short NAMESPACE_ERR = 14;
- const unsigned short INVALID_ACCESS_ERR = 15;
- const unsigned short VALIDATION_ERR = 16;
- const unsigned short TYPE_MISMATCH_ERR = 17;
- const unsigned short SECURITY_ERR = 18;
- const unsigned short NETWORK_ERR = 19;
- const unsigned short ABORT_ERR = 20;
- const unsigned short URL_MISMATCH_ERR = 21;
- const unsigned short QUOTA_EXCEEDED_ERR = 22;
- const unsigned short TIMEOUT_ERR = 23;
- const unsigned short INVALID_NODE_TYPE_ERR = 24;
- const unsigned short DATA_CLONE_ERR = 25;
-};
Copied: trunk/Source/WebCore/dom/DOMException.cpp (from rev 219729, trunk/Source/WebCore/dom/DOMCoreException.cpp) (0 => 219730)
--- trunk/Source/WebCore/dom/DOMException.cpp (rev 0)
+++ trunk/Source/WebCore/dom/DOMException.cpp 2017-07-21 16:35:32 UTC (rev 219730)
@@ -0,0 +1,114 @@
+/*
+ * Copyright (C) 2011 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY GOOGLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "DOMException.h"
+
+#include "ExceptionCode.h"
+#include "ExceptionCodeDescription.h"
+
+namespace WebCore {
+
+// http://heycam.github.io/webidl/#idl-DOMException-error-names
+static const struct CoreException {
+ const char* const name;
+ const char* const description;
+ ExceptionCode code;
+} coreExceptions[] = {
+ { "IndexSizeError", "The index is not in the allowed range.", 1 },
+ { nullptr, nullptr, 0 }, // DOMStringSizeError
+ { "HierarchyRequestError", "The operation would yield an incorrect node tree.", 3 },
+ { "WrongDocumentError", "The object is in the wrong document.", 4 },
+ { "InvalidCharacterError", "The string contains invalid characters.", 5 },
+ { nullptr, nullptr, 0 }, // NoDataAllowedError
+ { "NoModificationAllowedError", "The object can not be modified.", 7 },
+ { "NotFoundError", "The object can not be found here.", 8 },
+ { "NotSupportedError", "The operation is not supported.", 9 },
+ { "InUseAttributeError", "The attribute is in use.", 10 },
+ { "InvalidStateError", "The object is in an invalid state.", 11 },
+ { "SyntaxError", "The string did not match the expected pattern.", 12 },
+ { "InvalidModificationError", " The object can not be modified in this way.", 13 },
+ { "NamespaceError", "The operation is not allowed by Namespaces in XML.", 14 },
+ { "InvalidAccessError", "The object does not support the operation or argument.", 15 },
+ { nullptr, nullptr, 0 }, // ValidationError
+ { "TypeMismatchError", "The type of an object was incompatible with the expected type of the parameter associated to the object.", 17 },
+ { "SecurityError", "The operation is insecure.", 18 },
+ { "NetworkError", " A network error occurred.", 19 },
+ { "AbortError", "The operation was aborted.", 20 },
+ { "URLMismatchError", "The given URL does not match another URL.", 21 },
+ { "QuotaExceededError", "The quota has been exceeded.", 22 },
+ { "TimeoutError", "The operation timed out.", 23 },
+ { "InvalidNodeTypeError", "The supplied node is incorrect or has an incorrect ancestor for this operation.", 24 },
+ { "DataCloneError", "The object can not be cloned.", 25 },
+ { "EncodingError", "The encoding operation (either encoded or decoding) failed.", 0 },
+ { "NotReadableError", "The I/O read operation failed.", 0 },
+ { "UnknownError", "The operation failed for an unknown transient reason (e.g. out of memory).", 0 },
+ { "ConstraintError", "A mutation operation in a transaction failed because a constraint was not satisfied.", 0 },
+ { "DataError", "Provided data is inadequate.", 0 },
+ { "TransactionInactiveError", "A request was placed against a transaction which is currently not active, or which is finished.", 0 },
+ { "ReadOnlyError", "The mutating operation was attempted in a \"readonly\" transaction.", 0 },
+ { "VersionError", "An attempt was made to open a database using a lower version than the existing version.", 0 },
+ { "OperationError", "The operation failed for an operation-specific reason.", 0 },
+ { "NotAllowedError", "The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission.", 0 }
+};
+
+static ExceptionCode errorCodeFromName(const String& name)
+{
+ for (auto& entry : coreExceptions) {
+ if (entry.name == name)
+ return entry.code;
+ }
+ return 0;
+}
+
+Ref<DOMException> DOMException::create(const String& message, const String& name)
+{
+ return adoptRef(*new DOMException(errorCodeFromName(name), message, name));
+}
+
+DOMException::DOMException(ExceptionCode ec, const String& message, const String& name)
+ : ExceptionBase(ec, name, message, ASCIILiteral("DOM"))
+{
+}
+
+bool DOMException::initializeDescription(ExceptionCode ec, ExceptionCodeDescription* description)
+{
+ description->typeName = "DOM";
+ description->code = ec;
+ description->type = DOMExceptionType;
+
+ size_t tableSize = WTF_ARRAY_LENGTH(coreExceptions);
+ size_t tableIndex = ec - INDEX_SIZE_ERR;
+
+ description->name = tableIndex < tableSize ? coreExceptions[tableIndex].name : 0;
+ description->description = tableIndex < tableSize ? coreExceptions[tableIndex].description : 0;
+
+ return true;
+}
+
+} // namespace WebCore
Copied: trunk/Source/WebCore/dom/DOMException.h (from rev 219729, trunk/Source/WebCore/dom/DOMCoreException.h) (0 => 219730)
--- trunk/Source/WebCore/dom/DOMException.h (rev 0)
+++ trunk/Source/WebCore/dom/DOMException.h 2017-07-21 16:35:32 UTC (rev 219730)
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "ExceptionBase.h"
+
+namespace WebCore {
+
+class DOMException : public ExceptionBase {
+public:
+ static Ref<DOMException> create(const ExceptionCodeDescription& description)
+ {
+ return adoptRef(*new DOMException(description));
+ }
+ static Ref<DOMException> create(const String& message, const String& name);
+
+ static bool initializeDescription(ExceptionCode, ExceptionCodeDescription*);
+
+protected:
+ DOMException(ExceptionCode, const String& message, const String& name);
+ explicit DOMException(const ExceptionCodeDescription& description)
+ : ExceptionBase(description)
+ {
+ }
+};
+
+} // namespace WebCore
Copied: trunk/Source/WebCore/dom/DOMException.idl (from rev 219729, trunk/Source/WebCore/dom/DOMCoreException.idl) (0 => 219730)
--- trunk/Source/WebCore/dom/DOMException.idl (rev 0)
+++ trunk/Source/WebCore/dom/DOMException.idl 2017-07-21 16:35:32 UTC (rev 219730)
@@ -0,0 +1,66 @@
+/*
+ * Copyright (C) 2007 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+[
+ Constructor(optional DOMString message = "", optional DOMString name = "Error"),
+ DoNotCheckConstants,
+ Exposed=(Window,Worker),
+ ImplementationLacksVTable,
+] exception DOMException {
+
+ readonly attribute unsigned short code;
+ readonly attribute DOMString name;
+ readonly attribute DOMString message;
+
+ // ExceptionCode
+ const unsigned short INDEX_SIZE_ERR = 1;
+ const unsigned short DOMSTRING_SIZE_ERR = 2;
+ const unsigned short HIERARCHY_REQUEST_ERR = 3;
+ const unsigned short WRONG_DOCUMENT_ERR = 4;
+ const unsigned short INVALID_CHARACTER_ERR = 5;
+ const unsigned short NO_DATA_ALLOWED_ERR = 6;
+ const unsigned short NO_MODIFICATION_ALLOWED_ERR = 7;
+ const unsigned short NOT_FOUND_ERR = 8;
+ const unsigned short NOT_SUPPORTED_ERR = 9;
+ const unsigned short INUSE_ATTRIBUTE_ERR = 10;
+ const unsigned short INVALID_STATE_ERR = 11;
+ const unsigned short SYNTAX_ERR = 12;
+ const unsigned short INVALID_MODIFICATION_ERR = 13;
+ const unsigned short NAMESPACE_ERR = 14;
+ const unsigned short INVALID_ACCESS_ERR = 15;
+ const unsigned short VALIDATION_ERR = 16;
+ const unsigned short TYPE_MISMATCH_ERR = 17;
+ const unsigned short SECURITY_ERR = 18;
+ const unsigned short NETWORK_ERR = 19;
+ const unsigned short ABORT_ERR = 20;
+ const unsigned short URL_MISMATCH_ERR = 21;
+ const unsigned short QUOTA_EXCEEDED_ERR = 22;
+ const unsigned short TIMEOUT_ERR = 23;
+ const unsigned short INVALID_NODE_TYPE_ERR = 24;
+ const unsigned short DATA_CLONE_ERR = 25;
+};
Modified: trunk/Source/WebCore/dom/DOMExceptions.in (219729 => 219730)
--- trunk/Source/WebCore/dom/DOMExceptions.in 2017-07-21 16:34:49 UTC (rev 219729)
+++ trunk/Source/WebCore/dom/DOMExceptions.in 2017-07-21 16:35:32 UTC (rev 219730)
@@ -1,3 +1,3 @@
namespace=Exception
-DOMCoreException
+DOMException
Modified: trunk/Source/WebCore/dom/make_dom_exceptions.pl (219729 => 219730)
--- trunk/Source/WebCore/dom/make_dom_exceptions.pl 2017-07-21 16:34:49 UTC (rev 219729)
+++ trunk/Source/WebCore/dom/make_dom_exceptions.pl 2017-07-21 16:35:32 UTC (rev 219730)
@@ -165,8 +165,8 @@
print F " ASSERT(ec);\n";
for my $exceptionType (sort keys %parsedItems) {
- # DOMCoreException needs to be last because it's a catch-all.
- next if $exceptionType eq "DOMCoreException";
+ # DOMException needs to be last because it's a catch-all.
+ next if $exceptionType eq "DOMException";
my $conditional = $parsedItems{$exceptionType}{"conditional"};
@@ -185,7 +185,7 @@
print F " return;\n";
print F "#endif\n";
- print F " if (DOMCoreException::initializeDescription(ec, this))\n";
+ print F " if (DOMException::initializeDescription(ec, this))\n";
print F " return;\n";
print F " ASSERT_NOT_REACHED();\n";
print F "}\n";