Linter to catch new COM initialization calls in Windows builds
Categories
(Developer Infrastructure :: Lint and Formatting, task)
Tracking
(firefox91 fixed)
| Tracking | Status | |
|---|---|---|
| firefox91 | --- | fixed |
People
(Reporter: bugzilla, Assigned: bugzilla)
References
Details
Attachments
(1 file)
As of bug 1707954 landing, I would like us to begin failing Windows builds when a patch adds new calls to the following functions:
CoInitializeCoInitializeExCoUninitializeOleUninitializeOleInitializeRoInitializeRoUninitialize
We will need a list of exceptions, as there are many extant calls already in the tree. Furthermore, mozilla::mscom::ProcessRuntime and mozilla::mscom::EnsureMTA should be exempt, as these two classes are the ones that actually do need to make such calls.
| Assignee | ||
Comment 1•4 years ago
|
||
This patch adds a new linter that will error when new code mentions any one of
the following strings:
CoInitialize;CoInitializeEx;OleInitialize;RoInitialize;CoUninitialize;OleUninitialize; andRoUninitialize.
Since I don't care about context, and just want to flag code containing these
names, I opted for a regex linter.
Yes, the regex does match a few strings beyond the above list (in particular, it
also matches additional strings that end with an Ex suffix), but since
functions with those names don't exist anyway (and would be errors in their own
right), I am not concerned about it.
All existing occurrences have been added to the exclusion list, with the
intent of removing most of them over time.
Updated•4 years ago
|
| Assignee | ||
Comment 2•4 years ago
|
||
Comment 4•4 years ago
|
||
| bugherder | ||
Updated•3 years ago
|
Description
•