mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:17:45 +00:00
Kernel: Mark Process::jail() method as const
We really don't want callers of this function to accidentally change the jail, or even worse - remove the Process from an attached jail. To ensure this never happens, we can just declare this method as const so nobody can mutate it this way.
This commit is contained in:
parent
a03d42b098
commit
04221a7533
6 changed files with 13 additions and 13 deletions
|
@ -238,7 +238,7 @@ public:
|
|||
return with_protected_data([](auto& protected_data) { return protected_data.ppid; });
|
||||
}
|
||||
|
||||
SpinlockProtected<RefPtr<Jail>, LockRank::Process>& jail() { return m_attached_jail; }
|
||||
SpinlockProtected<RefPtr<Jail>, LockRank::Process> const& jail() { return m_attached_jail; }
|
||||
|
||||
bool is_currently_in_jail() const
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue