diff options
author | Linus Groh <mail@linusgroh.de> | 2022-09-25 17:28:46 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-09-25 19:13:31 +0100 |
commit | bbaa05fcf9a2a7b9515319b102a234be930824cd (patch) | |
tree | 4113d3e5f6cfa9331f80b62cb9783020c701fdae /Userland/Libraries/LibWeb/WebIDL/ExceptionOr.h | |
parent | ad04d7ac9b88ecea572cf517f6e01ccf1e95073d (diff) | |
download | serenity-bbaa05fcf9a2a7b9515319b102a234be930824cd.zip |
LibWeb: Move DOMException from DOM/ to WebIDL/
Diffstat (limited to 'Userland/Libraries/LibWeb/WebIDL/ExceptionOr.h')
-rw-r--r-- | Userland/Libraries/LibWeb/WebIDL/ExceptionOr.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Userland/Libraries/LibWeb/WebIDL/ExceptionOr.h b/Userland/Libraries/LibWeb/WebIDL/ExceptionOr.h index 23944eafa3..aec297d69d 100644 --- a/Userland/Libraries/LibWeb/WebIDL/ExceptionOr.h +++ b/Userland/Libraries/LibWeb/WebIDL/ExceptionOr.h @@ -9,7 +9,7 @@ #include <AK/NonnullRefPtr.h> #include <AK/Optional.h> #include <AK/RefPtr.h> -#include <LibWeb/DOM/DOMException.h> +#include <LibWeb/WebIDL/DOMException.h> namespace Web::WebIDL { @@ -49,7 +49,7 @@ public: { } - ExceptionOr(JS::NonnullGCPtr<DOM::DOMException> exception) + ExceptionOr(JS::NonnullGCPtr<DOMException> exception) : m_exception(move(exception)) { } @@ -59,8 +59,8 @@ public: { } - ExceptionOr(Variant<SimpleException, JS::NonnullGCPtr<DOM::DOMException>> exception) - : m_exception(move(exception).template downcast<Empty, SimpleException, JS::NonnullGCPtr<DOM::DOMException>>()) + ExceptionOr(Variant<SimpleException, JS::NonnullGCPtr<DOMException>> exception) + : m_exception(move(exception).template downcast<Empty, SimpleException, JS::NonnullGCPtr<DOMException>>()) { } @@ -78,9 +78,9 @@ public: return m_result.release_value(); } - Variant<SimpleException, JS::NonnullGCPtr<DOM::DOMException>> exception() const + Variant<SimpleException, JS::NonnullGCPtr<DOMException>> exception() const { - return m_exception.template downcast<SimpleException, JS::NonnullGCPtr<DOM::DOMException>>(); + return m_exception.template downcast<SimpleException, JS::NonnullGCPtr<DOMException>>(); } bool is_exception() const @@ -90,13 +90,13 @@ public: // These are for compatibility with the TRY() macro in AK. [[nodiscard]] bool is_error() const { return is_exception(); } - Variant<SimpleException, JS::NonnullGCPtr<DOM::DOMException>> release_error() { return exception(); } + Variant<SimpleException, JS::NonnullGCPtr<DOMException>> release_error() { return exception(); } private: Optional<ValueType> m_result; // https://webidl.spec.whatwg.org/#idl-exceptions - Variant<Empty, SimpleException, JS::NonnullGCPtr<DOM::DOMException>> m_exception {}; + Variant<Empty, SimpleException, JS::NonnullGCPtr<DOMException>> m_exception {}; }; template<> |