mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 13:32:45 +00:00 
			
		
		
		
	Kernel: Stop using *LockRefPtr for Process pointers
The only persistent one of these was Thread::m_process and that never changes after initialization. Make it const to enforce this and switch everything over to RefPtr & NonnullRefPtr.
This commit is contained in:
		
							parent
							
								
									19084ef743
								
							
						
					
					
						commit
						65438d8a85
					
				
					 11 changed files with 42 additions and 42 deletions
				
			
		|  | @ -52,7 +52,7 @@ bool Coredump::FlatRegionData::is_consistent_with_region(Memory::Region const& r | |||
|     return true; | ||||
| } | ||||
| 
 | ||||
| ErrorOr<NonnullOwnPtr<Coredump>> Coredump::try_create(NonnullLockRefPtr<Process> process, StringView output_path) | ||||
| ErrorOr<NonnullOwnPtr<Coredump>> Coredump::try_create(NonnullRefPtr<Process> process, StringView output_path) | ||||
| { | ||||
|     if (!process->is_dumpable()) { | ||||
|         dbgln("Refusing to generate coredump for non-dumpable process {}", process->pid().value()); | ||||
|  | @ -74,7 +74,7 @@ ErrorOr<NonnullOwnPtr<Coredump>> Coredump::try_create(NonnullLockRefPtr<Process> | |||
|     return adopt_nonnull_own_or_enomem(new (nothrow) Coredump(move(process), move(description), move(regions))); | ||||
| } | ||||
| 
 | ||||
| Coredump::Coredump(NonnullLockRefPtr<Process> process, NonnullRefPtr<OpenFileDescription> description, Vector<FlatRegionData> regions) | ||||
| Coredump::Coredump(NonnullRefPtr<Process> process, NonnullRefPtr<OpenFileDescription> description, Vector<FlatRegionData> regions) | ||||
|     : m_process(move(process)) | ||||
|     , m_description(move(description)) | ||||
|     , m_regions(move(regions)) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling