mirror of
				https://github.com/LadybirdBrowser/ladybird.git
				synced 2025-10-31 13:20:59 +00:00 
			
		
		
		
	LibWeb: Make DOMException GC-allocated
This commit is contained in:
		
							parent
							
								
									0e47754ac8
								
							
						
					
					
						commit
						497ead37bc
					
				
				
				Notes:
				
					sideshowbarker
				
				2024-07-17 23:07:41 +09:00 
				
			
			Author: https://github.com/awesomekling
Commit: 497ead37bc
Pull-request: https://github.com/SerenityOS/serenity/pull/14816
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/linusg ✅
			
					 58 changed files with 307 additions and 278 deletions
				
			
		|  | @ -43,7 +43,7 @@ DOM::ExceptionOr<JS::NonnullGCPtr<HTMLTableRowElement>> HTMLTableSectionElement: | |||
| 
 | ||||
|     // 1. If index is less than −1 or greater than the number of elements in the rows collection, throw an "IndexSizeError" DOMException.
 | ||||
|     if (index < -1 || index > rows_collection_size) | ||||
|         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"); | ||||
| 
 | ||||
|     // 2. Let table row be the result of creating an element given this element's node document, tr, and the HTML namespace.
 | ||||
|     auto& table_row = static_cast<HTMLTableRowElement&>(*DOM::create_element(document(), TagNames::tr, Namespace::HTML)); | ||||
|  | @ -67,7 +67,7 @@ DOM::ExceptionOr<void> HTMLTableSectionElement::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 >= rows_collection_size) | ||||
|         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 this element, or do nothing if the rows collection is empty.
 | ||||
|     if (index == -1) { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling