Using int32_t for the child process id can be fraught with peril.
Developers can mistake this for the PID. Bugs can be created by passing
in an invalid value by mistake. Using a strongly typed ChildProcessId
instead will allow the compiler to catch errors.
This change creates a ChildProcessId type and modifies
ChildProcessHost::GenerateChildProcessUniqueId to use this new type.
During the investigation, it was determined
GenerateChildProcessUniqueId should only be called on the UI thread,
so a check to ensure it's only called on the UI thread was added.
Follow-ups will be required to modify references.
Bug: 379869738
Change-Id: I3e3998a864a398c7323852969c01cc6186d89670
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6034112
Auto-Submit: Emily Andrews <emiled@microsoft.com>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Stefan Smolen <ssmole@microsoft.com>
Reviewed-by: Mike Wasserman <msw@chromium.org>
Commit-Queue: Mike Wasserman <msw@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1391188}
Following the same pattern other child processes uses, this CL
adds support for histograms to app shim process using shared
memory. Histograms collected before the shared memory connection
is set up are transmitted using the ChildHistogramFetcher mojo
interface (and are lost if a connection is never established).
Histograms after are shared immediately via shared memory (but
are lost if the browser process crashes before they are processed,
matching behavior for other child processes).
See https://docs.google.com/document/d/19dANu83w-9q-Ft5PU1cxDHiKdZv4hDLyAdr2Zf3JgSc/edit?usp=sharing for more background.
Bug: 40281917
Include-Ci-Only-Tests: true
Change-Id: I0f00edba892bae3549293d46ab9af602dbf5176e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5363833
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Alexei Svitkine <asvitkine@chromium.org>
Commit-Queue: Marijn Kruisselbrink <mek@chromium.org>
Reviewed-by: Will Harris <wfh@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1288435}
This CL fixes the use of incorrect namespaces detected by
`bugprone-forward-declaration-namespace` clang-tidy check in //content.
Bug: 1519029
Change-Id: I4cfe6c9a1c44eb8d9d4fa7da4e700dc0fa2a12dd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5210693
Reviewed-by: Charlie Reis <creis@chromium.org>
Commit-Queue: Miyoung Shin <myid.shin@igalia.com>
Cr-Commit-Position: refs/heads/main@{#1250628}