I'm a Chrome developer and I've been working on reducing how frequently windows.h is included in source files when building Chrome for Windows. It used to be (2018) that more than 78% of Chrome's translation units included windows.h When I picked up this project again in June this had been reduced and about half of Chrome's translation units pulled in windows.h. Since June I have reduced this to less than 22%. About 9% of the remaining uses of windows.h (2% of source files used when building Chrome) are in v8 - 761 translation units.
The advantages of reducing usage of windows.h are (very slightly) reduced compile times, reduced namespace pollution (no more #define DrawText DrawTextW), reduced warning-flag manipulation, etc. Mostly it's about avoiding those macro definitions.
So...
I'm looking at getting v8 to use windows.h less. The techniques are well understood and proven and are best summarized in the contents of
windows_types.h. This creates the minimal set of typedefs and defines needed to compile Chrome's header files and portable code. In a few cases (CONDITION_VARIABLE, for instance) it is necessary to define Chrome proxy's for Windows types, and
cast between them when calling Windows functions.
This is a medium sized project that will require landing lots of small CLs. I've done enough investigation to get a sense of the scope. I'll need to create V8 proxy-types for CONDITION_VARIABLE, SRWLOCK, and CRITICAL_SECTION, create typedefs for HANDLE (this is easy - there's no casting required), and explicitly include windows.h in a few source files that actually need it. And I'll need to fix whatever other issues pop up, but I'm not expecting anything worse than what I've seen before. I think that the vast majority of v8 files will be able to compile without windows.h.
Is this a project that V8 would support? If so, can I get a volunteer/sponsor who I can work with for advice and some code reviews?