diff --git a/config/msvc-stl-wrapper.template.h b/config/msvc-stl-wrapper.template.h index 2834b2823256..fe9be05011e4 100644 --- a/config/msvc-stl-wrapper.template.h +++ b/config/msvc-stl-wrapper.template.h @@ -56,6 +56,13 @@ #ifdef MOZ_INCLUDE_MOZALLOC_H_FROM_${HEADER} // See if we're in code that can use mozalloc. # if !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC) +// In recent versions of MSVC, , which mozalloc.h includes, uses +// without including it. Before MSVC 17.7, this worked +// fine because included , which includes . +// That is still the case, but it now also includes before +// , so when something includes before , +// we get here before is included, which ends up not working. +# include # include "mozilla/mozalloc.h" # else # error "STL code can only be used with infallible ::operator new()"