summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/HTML/HTMLTableElement.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2022-09-04 16:56:15 +0200
committerAndreas Kling <kling@serenityos.org>2022-09-06 00:27:09 +0200
commit497ead37bcc959a9325aa22b0a233e302b071229 (patch)
tree5657266abb6d64bef43e251c002d05a392055562 /Userland/Libraries/LibWeb/HTML/HTMLTableElement.cpp
parent0e47754ac82b3c9996732fc29dac9d2a1abed8ac (diff)
downloadserenity-497ead37bcc959a9325aa22b0a233e302b071229.zip
LibWeb: Make DOMException GC-allocated
Diffstat (limited to 'Userland/Libraries/LibWeb/HTML/HTMLTableElement.cpp')
-rw-r--r--Userland/Libraries/LibWeb/HTML/HTMLTableElement.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Userland/Libraries/LibWeb/HTML/HTMLTableElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLTableElement.cpp
index 8e9566e0dd..aacc49517b 100644
--- a/Userland/Libraries/LibWeb/HTML/HTMLTableElement.cpp
+++ b/Userland/Libraries/LibWeb/HTML/HTMLTableElement.cpp
@@ -103,7 +103,7 @@ DOM::ExceptionOr<void> HTMLTableElement::set_t_head(HTMLTableSectionElement* the
VERIFY(thead);
if (thead->local_name() != TagNames::thead)
- return DOM::HierarchyRequestError::create("Element is not thead");
+ return DOM::HierarchyRequestError::create(global_object(), "Element is not thead");
// FIXME: The spec requires deleting the current thead if thead is null
// Currently the wrapper generator doesn't send us a nullable value
@@ -190,7 +190,7 @@ DOM::ExceptionOr<void> HTMLTableElement::set_t_foot(HTMLTableSectionElement* tfo
VERIFY(tfoot);
if (tfoot->local_name() != TagNames::tfoot)
- return DOM::HierarchyRequestError::create("Element is not tfoot");
+ return DOM::HierarchyRequestError::create(global_object(), "Element is not tfoot");
// FIXME: The spec requires deleting the current tfoot if tfoot is null
// Currently the wrapper generator doesn't send us a nullable value
@@ -286,7 +286,7 @@ DOM::ExceptionOr<JS::NonnullGCPtr<HTMLTableRowElement>> HTMLTableElement::insert
auto rows_length = rows->length();
if (index < -1 || index > (long)rows_length) {
- return DOM::IndexSizeError::create("Index is negative or greater than the number of rows");
+ return DOM::IndexSizeError::create(global_object(), "Index is negative or greater than the number of rows");
}
auto& tr = static_cast<HTMLTableRowElement&>(*DOM::create_element(document(), TagNames::tr, Namespace::HTML));
if (rows_length == 0 && !has_child_of_type<HTMLTableRowElement>()) {
@@ -313,7 +313,7 @@ DOM::ExceptionOr<void> HTMLTableElement::delete_row(long index)
// 1. If index is less than −1 or greater than or equal to the number of elements in the rows collection, then throw an "IndexSizeError" DOMException.
if (index < -1 || index >= (long)rows_length)
- return DOM::IndexSizeError::create("Index is negative or greater than or equal to the number of rows");
+ return DOM::IndexSizeError::create(global_object(), "Index is negative or greater than or equal to the number of rows");
// 2. If index is −1, then remove the last element in the rows collection from its parent, or do nothing if the rows collection is empty.
if (index == -1) {