Repository: electron
Issue: Fix thread restriction violating callsites
Labels: platform/linux,bug :beetle:,34-x-y

### Preflight Checklist

- [x] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project.
- [x] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to.
- [x] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success.

### Electron Version

33.x

### What operating system(s) are you using?

Ubuntu

### Operating System Version

24.04

### What arch are you using?

x64

### Last Known Working Electron version

32.x

### Expected Behavior

No thread restriction issues found.



### Actual Behavior

For now I see one on startup with [Linux arm builds](https://productionresultssa14.blob.core.windows.net/actions-results/b4921e6c-0563-426c-bc9e-e3fdba2e36ee/workflow-job-run-e7ba3a15-2fb6-5d8c-fa31-03f3c2308494/logs/job/job-logs.txt?rsct=text%2Fplain&se=2024-10-17T02%3A08%3A29Z&sig=0nLhgKcGSkzO253QCHEAoMlPt7z9uqEu1NizwkBa0X8%3D&ske=2024-10-17T12%3A28%3A25Z&skoid=ca7593d4-ee42-46cd-af88-8b886a2f84eb&sks=b&skt=2024-10-17T00%3A28%3A25Z&sktid=398a6654-997b-47e9-b12b-9515b896b4de&skv=2024-08-04&sp=r&spr=https&sr=b&st=2024-10-17T01%3A58%3A24Z&sv=2024-08-04) that seems to trigger this violation , we should address it

```
[6175:1016/155818.570487:FATAL:thread_restrictions.cc(58)] Check failed: !tls_blocking_disallowed. Function marked as blocking was called from a scope that disallows blocking! If this task is running inside the ThreadPool, it needs to have MayBlock() in its TaskTraits. Otherwise, consider making this blocking work asynchronous or, as a last resort, you may use ScopedAllowBlocking (see its documentation for best practices).
tls_blocking_disallowed 1 set by
#0 0x00000642b53e base::debug::CollectStackTrace() [../../base/debug/stack_trace_posix.cc:1044:7]
#1 0x00000641c5b2 base::debug::StackTrace::StackTrace() [../../base/debug/stack_trace.cc:245:20]
#2 0x000006407810 base::DisallowUnresponsiveTasks() [../../third_party/libc++/src/include/__memory/construct_at.h:41:46]
#3 0x00000508f21e content::BrowserMainLoop::PreMainMessageLoopRun() [../../content/browser/browser_main_loop.cc:1060:3]
#4 0x000002616028 base::OnceCallback<>::Run() [../../base/functional/callback.h:156:12]
#5 0x00000566eb38 content::StartupTaskRunner::RunAllTasksNow() [../../content/browser/startup_task_runner.cc:42:29]
#6 0x00000508ed8c content::BrowserMainLoop::CreateStartupTasks() [../../content/browser/browser_main_loop.cc:915:25]
#7 0x00000509117e content::BrowserMainRunnerImpl::Initialize() [../../content/browser/browser_main_runner_impl.cc:137:15]
#8 0x00000508d374 content::BrowserMain() [../../content/browser/browser_main.cc:30:32]
#9 0x00000282eb40 content::RunBrowserProcessMain() [../../content/app/content_main_runner_impl.cc:735:10]
#10 0x000002830606 content::ContentMainRunnerImpl::RunBrowser() [../../content/app/content_main_runner_impl.cc:1314:10]
#11 0x000002830230 content::ContentMainRunnerImpl::Run() [../../content/app/content_main_runner_impl.cc:1165:12]
#12 0x00000282db1c content::RunContentProcess() [../../content/app/content_main.cc:354:36]
#13 0x00000282dd56 content::ContentMain() [../../content/app/content_main.cc:367:10]
#14 0x000002548cc2 main [../../electron/shell/app/electron_main_linux.cc:44:10]
#15 0x0000f654c5a4 __libc_start_main
```

### Testcase Gist URL

_No response_

### Additional Information

Starting with https://chromium-review.googlesource.com/c/chromium/src/+/5851095 callsites that violate thread restrictions will use `DUMP_WITHOUT_CRASHING` in official builds. The change has been reverted in M130 https://chromium-review.googlesource.com/c/chromium/src/+/5919509 but is present in newer versions. 

The testing builds have always DCHECK'd on these failures and they will remain the same.