0
Files
src/content/utility
Francois Doray b1d79a4a3c Initialize COM in the Main of UtilWin process.
Previously, COM was initialized in the scope of methods running in
the UtilWin process. This is believed to be incorrect
(go/chrome-util-win-com-init-chat). COM should be initialized
"before you call any of the library functions [...]" [1] and
uninitialized "on application shutdown" [2] . Also, a COM STA thread
should "have a message loop" [3].

This CL introduces 2 features which:
- Request a UI pump for the UtilWin process, instead of a
  default pump.
- Initialize COM for the full lifetime of utility processes that
  use a UI pump.

It also introduces a UMA histogram to see if that reduces hangs in
the file select dialog.

[1] https://learn.microsoft.com/en-us/windows/win32/api/objbase/nf-objbase-coinitialize
[2] https://learn.microsoft.com/en-us/windows/win32/api/combaseapi/nf-combaseapi-couninitialize
[3].

Bug: 348014083
Change-Id: Id78568c1aace1834b057f5d21e9642ece6a36986
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5599006
Reviewed-by: Patrick Monette <pmonette@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Robert Kaplow <rkaplow@chromium.org>
Commit-Queue: Francois Pierre Doray <fdoray@chromium.org>
Reviewed-by: Greg Thompson <grt@chromium.org>
Auto-Submit: Francois Pierre Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1330478}
2024-07-19 20:24:19 +00:00
..