Bug 1189891: Only include STL wrapper requirements on the first include. r=glandium
☠☠ backed out by d50e07c09227 ☠ ☠
authorBas Schouten <bschouten@mozilla.com>
Thu, 20 Aug 2015 20:03:44 +0000
changeset 291363 151d70cfe45fc2f05b0d1dac2dd68033831a5a9d
parent 291362 6e58ac399828771311c16b4f3f0c74030b0eacff
child 291364 f13c2ff66c6df6a5262f13f2c130b4f65019a967
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1189891
milestone43.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1189891: Only include STL wrapper requirements on the first include. r=glandium
config/msvc-stl-wrapper.template.h
--- a/config/msvc-stl-wrapper.template.h
+++ b/config/msvc-stl-wrapper.template.h
@@ -3,16 +3,19 @@
  */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_${HEADER}_h
 #define mozilla_${HEADER}_h
 
+#ifndef MOZ_HAVE_INCLUDED_ALLOC
+#define MOZ_HAVE_INCLUDED_ALLOC
+
 #if _HAS_EXCEPTIONS
 #  error "STL code can only be used with -fno-exceptions"
 #endif
 
 // Code built with !_HAS_EXCEPTIONS calls std::_Throw(), but the win2k
 // CRT doesn't export std::_Throw().  So we define it.
 #ifndef mozilla_Throw_h
 #  include "mozilla/throw_msvc.h"
@@ -27,16 +30,17 @@
 // See if we're in code that can use mozalloc.  NB: this duplicates
 // code in nscore.h because nscore.h pulls in prtypes.h, and chromium
 // can't build with that being included before base/basictypes.h.
 #if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC)
 #  include "mozilla/mozalloc.h"
 #else
 #  error "STL code can only be used with infallible ::operator new()"
 #endif
+#endif /* MOZ_HAVE_INCLUDED_ALLOC */
 
 #ifdef _DEBUG
 // From
 //   http://msdn.microsoft.com/en-us/library/aa985982%28VS.80%29.aspx
 // and
 //   http://msdn.microsoft.com/en-us/library/aa985965%28VS.80%29.aspx
 // there appear to be two types of STL container checking.  The
 // former is enabled by -D_DEBUG (which is implied by -MDd or -MTd), and