mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 06:02:44 +00:00 
			
		
		
		
	LibJS: Convert internal_get_prototype_of() to ThrowCompletionOr
This commit is contained in:
		
							parent
							
								
									c8bf7f9c41
								
							
						
					
					
						commit
						5148150e1c
					
				
					 14 changed files with 48 additions and 70 deletions
				
			
		|  | @ -1654,9 +1654,7 @@ bool @class_name@::is_named_property_exposed_on_object(JS::PropertyName const& p | |||
|                 scoped_generator.append(R"~~~( | ||||
|     // NOTE: Step 3 is not here as the interface doesn't have the LegacyOverrideBuiltIns extended attribute.
 | ||||
|     // 4. Let prototype be O.[[GetPrototypeOf]]().
 | ||||
|     auto* prototype = internal_get_prototype_of(); | ||||
|     if (vm.exception()) | ||||
|         return {}; | ||||
|     auto* prototype = TRY_OR_DISCARD(internal_get_prototype_of()); | ||||
| 
 | ||||
|     // 5. While prototype is not null:
 | ||||
|     while (prototype) { | ||||
|  | @ -1670,9 +1668,7 @@ bool @class_name@::is_named_property_exposed_on_object(JS::PropertyName const& p | |||
|             return false; | ||||
| 
 | ||||
|         // 2. Set prototype to prototype.[[GetPrototypeOf]]().
 | ||||
|         prototype = prototype->internal_get_prototype_of(); | ||||
|         if (vm.exception()) | ||||
|             return {}; | ||||
|         prototype = TRY_OR_DISCARD(prototype->internal_get_prototype_of()); | ||||
|     } | ||||
| 
 | ||||
|     // 6. Return true.
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Linus Groh
						Linus Groh