mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 20:22:45 +00:00 
			
		
		
		
	LibJS: Allow cells to mark null pointers
This simplifies the cell visiting functions by letting them not worry about the pointers they pass to the visitor being null.
This commit is contained in:
		
							parent
							
								
									1f4e3dd073
								
							
						
					
					
						commit
						1b391d78ae
					
				
					 5 changed files with 16 additions and 13 deletions
				
			
		|  | @ -34,10 +34,16 @@ | |||
| 
 | ||||
| namespace JS { | ||||
| 
 | ||||
| void Cell::Visitor::visit(Cell* cell) | ||||
| { | ||||
|     if (cell) | ||||
|         visit_impl(cell); | ||||
| } | ||||
| 
 | ||||
| void Cell::Visitor::visit(Value value) | ||||
| { | ||||
|     if (value.is_cell()) | ||||
|         visit(value.as_cell()); | ||||
|         visit_impl(value.as_cell()); | ||||
| } | ||||
| 
 | ||||
| Heap& Cell::heap() const | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling