mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 17:02:45 +00:00 
			
		
		
		
	LibJS: Make Value::to_string_without_side_effects() infallible
Work towards #20449.
This commit is contained in:
		
							parent
							
								
									b8f78c0adc
								
							
						
					
					
						commit
						97ebfd9f0f
					
				
					 69 changed files with 182 additions and 182 deletions
				
			
		|  | @ -154,7 +154,7 @@ JS::Completion call_user_object_operation(WebIDL::CallbackType& callback, Deprec | |||
| 
 | ||||
|         // 4. If ! IsCallable(X) is false, then set completion to a new Completion{[[Type]]: throw, [[Value]]: a newly created TypeError object, [[Target]]: empty}, and jump to the step labeled return.
 | ||||
|         if (!get_result.value().is_function()) { | ||||
|             completion = realm.vm().template throw_completion<JS::TypeError>(JS::ErrorType::NotAFunction, TRY_OR_THROW_OOM(realm.vm(), get_result.value().to_string_without_side_effects())); | ||||
|             completion = realm.vm().template throw_completion<JS::TypeError>(JS::ErrorType::NotAFunction, get_result.value().to_string_without_side_effects()); | ||||
|             return clean_up_on_return(stored_settings, relevant_settings, completion, callback.operation_returns_promise); | ||||
|         } | ||||
| 
 | ||||
|  | @ -258,7 +258,7 @@ JS::Completion construct(WebIDL::CallbackType& callback, JS::MarkedVector<JS::Va | |||
| 
 | ||||
|     // 3. If IsConstructor(F) is false, throw a TypeError exception.
 | ||||
|     if (!JS::Value(function_object).is_constructor()) | ||||
|         return realm.vm().template throw_completion<JS::TypeError>(JS::ErrorType::NotAConstructor, TRY_OR_THROW_OOM(realm.vm(), JS::Value(function_object).to_string_without_side_effects())); | ||||
|         return realm.vm().template throw_completion<JS::TypeError>(JS::ErrorType::NotAConstructor, JS::Value(function_object).to_string_without_side_effects()); | ||||
| 
 | ||||
|     // 5. Let relevant settings be realm’s settings object.
 | ||||
|     auto& relevant_settings = Bindings::host_defined_environment_settings_object(realm); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling