Including mozmemory_utils.h in some source files breaks builds
Categories
(Core :: Memory Allocator, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox136 | --- | fixed |
People
(Reporter: pbone, Assigned: pbone)
Details
Attachments
(1 file, 1 obsolete file)
This file, mozmemory_utils.h, cannot be included easily since it can create strange build problems with windows headers, even with the right #ifdefs. It currently has only "stall on allocation failure" code, which we can move to a new header should we want to add more generic "utils" in the future.
Assignee | ||
Comment 1•2 months ago
|
||
This file includes some windows headers and including it in some .cpp files
creates build errors (despite #ifdef XP_WIN). So if we want to add more
"utils" first we should more everything related to stalling on a failed
allocation into a new header file.
Comment 2•2 months ago
|
||
That is actually surprising. It's "only" including wtypes.h, which shouldn't be that bad. What kind of errors are you seeing?
Updated•2 months ago
|
Assignee | ||
Comment 3•2 months ago
•
|
||
I was including it in, I think the profiler, and windows builds failed because they couldn't find windows.h
Edit, it wasn't the profiler. I was including it in a bunch of places including DOMArena and js/public/Utilities.h which meant it got pulled in by lots of parts of the build. But I think it was the profiler that failed.
Assignee | ||
Updated•2 months ago
|
Comment 4•2 months ago
|
||
Can you link to a log? That makes no sense to me.
Updated•2 months ago
|
Assignee | ||
Comment 5•2 months ago
|
||
(In reply to Mike Hommey [:glandium] from comment #4)
Can you link to a log? That makes no sense to me.
Sure, https://treeherder.mozilla.org/jobs?repo=try&revision=49291af35dca641e2317ab582d2afe1c51547616&selectedTaskRun=c1fTkstlSw6vJ6TO28_7HQ.0 It was from a couple of weeks ago. The patches add more functions into mozmemory_utils.h and include it in more places.
Comment 6•2 months ago
|
||
Ok, so wtypes.h includes rpc.h which includes windows.h. Sadfaces all the way down. I think we should just remove the include. We can just use standard types rather than the windows equivalents.
Assignee | ||
Comment 7•17 days ago
|
||
Assignee | ||
Updated•16 days ago
|
Updated•16 days ago
|
Updated•16 days ago
|
Description
•