Consider deprecating "restricted mode" from `mozc_server` and `mozc_renderer` on Windows
- Dominant language
- C++
- Stars
- 3k
- Forks
- 525
- PR merge metrics
- No merged PRs in 30d
Description
## Description
As Mozc no longer supports Windows 7 and prior OSes where nested Win32 Jobs were not supported, chances are quite high that we can remove so-called **Restricted Mode** from `mozc_server` and `mozc_renderer`. Let's see if we can actually do that.
https://github.com/google/mozc/blob/2efeece0ae519a17ffceaa766b5be1525f7cec7b/src/server/mozc_server.cc#L52
https://github.com/google/mozc/blob/2efeece0ae519a17ffceaa766b5be1525f7cec7b/src/renderer/renderer_server.cc#L61-L65
### Background
When Mozc's sandbox architecture was originally designed for Windows, one of the challenges was that [nested Win32 Jobs](https://learn.microsoft.com/en-us/windows/win32/procthread/nested-jobs) were not supported, while Mozc wanted to create a Job when launching `mozc_server` and `mozc_renderer` so that those two processes could run in limited resource accesses. The solution we chose was to introduce a special mode called "Restricted Mode" where those processes run without Win32 Job sandboxing only for a limited time duration (e.g. 60 sec). Restricted mode is used only when all the following conditions are met:
* The server process (`mozc_server` or `mozc_renderer`) is not yet running.
* The client process (e.g. `notepad.exe`) is already running in a Win32 Job without `JOB_OBJECT_LIMIT_BREAKAWAY_OK` nor `JOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OK`.
https://github.com/google/mozc/blob/2efeece0ae519a17ffceaa766b5be1525f7cec7b/src/client/server_launcher.cc#L118-L134
Now that nested Win32 Jobs have been fully supported since Windows 8, it's highly likely the above special mode is no longer necessary.
## Steps to reproduce
TBD.
## Expected behavior
TBD.
## Actual behavior
TBD.
## Version or commit-id
2efeece0ae519a17ffceaa766b5be1525f7cec7b
## Environment
- OS: Windows 24H2
Contributor guide
Assessment
This issue has not been assessed yet.