mirror of
				https://github.com/LadybirdBrowser/ladybird.git
				synced 2025-11-03 23:00:58 +00:00 
			
		
		
		
	LibJS+Everywhere: Allow Cell::initialize overrides to throw OOM errors
Note that as of this commit, there aren't any such throwers, and the call site in Heap::allocate will drop exceptions on the floor. This commit only serves to change the declaration of the overrides, make sure they return an empty value, and to propagate OOM errors frm their base initialize invocations.
This commit is contained in:
		
							parent
							
								
									1c1b902a6a
								
							
						
					
					
						commit
						2692db8699
					
				
				
				Notes:
				
					sideshowbarker
				
				2024-07-17 01:01:29 +09:00 
				
			
			Author: https://github.com/trflynn89
Commit: 2692db8699
Pull-request: https://github.com/SerenityOS/serenity/pull/17220
Reviewed-by: https://github.com/linusg ✅
			
					 694 changed files with 1774 additions and 1065 deletions
				
			
		| 
						 | 
				
			
			@ -41,10 +41,12 @@ HTMLInputElement::HTMLInputElement(DOM::Document& document, DOM::QualifiedName q
 | 
			
		|||
 | 
			
		||||
HTMLInputElement::~HTMLInputElement() = default;
 | 
			
		||||
 | 
			
		||||
void HTMLInputElement::initialize(JS::Realm& realm)
 | 
			
		||||
JS::ThrowCompletionOr<void> HTMLInputElement::initialize(JS::Realm& realm)
 | 
			
		||||
{
 | 
			
		||||
    Base::initialize(realm);
 | 
			
		||||
    MUST_OR_THROW_OOM(Base::initialize(realm));
 | 
			
		||||
    set_prototype(&Bindings::ensure_web_prototype<Bindings::HTMLInputElementPrototype>(realm, "HTMLInputElement"));
 | 
			
		||||
 | 
			
		||||
    return {};
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void HTMLInputElement::visit_edges(Cell::Visitor& visitor)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue