Closed Bug 659709 Opened 14 years ago Closed 14 years ago

MOZALLOC_HAVE_XMALLOC appears unconditionally defined...?

Categories

(Core :: XPCOM, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: zwol, Unassigned)

Details

nsTArray.h has some behavior (sp. infallible allocation) conditionalized on MOZALLOC_HAVE_XMALLOC (this is the only use of that macro in the tree). This macro is unconditionally defined by mozalloc.h, which is included by nscore.h if none of XPCOM_GLUE, NS_NO_XPCOM, and MOZ_NO_MOZALLOC are defined. None of those macros are defined by code anywhere in mozilla-central. What prevents us from nuking all of the above macros and making nsTArray's infallible-allocation behavior unconditional? Assuming that for some reason this is not possible, what should code (inside libxul) that wants to be sure nsTArray behaves infallibly do?
XPCOM_GLUE is defined for the standalone glue which is linked by embedders and (soon) by glandium's new `firefox` executable. MOZ_NO_MOZALLOC is intended for embedders who can't use mozalloc for some reason. But none of this affects libxul code, which always gets the infallible version by default.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.