Files
palemoon27/config/msvc-stl-wrapper.template.h
T
roytam1 95440d2f99 import changes from `dev' branch of rmottola/Arctic-Fox:
- Bug 1166847 followup: Add 'override' annotation to some new overriding methods in jswrapper.h. rs=ehsan (20a3e9857)
- pointer style (b13f08224)
- Bug 1201271 - Warn about unused results for more methods of nsTArray. r=froydnj (c8fa9e836)
- Bug 1156398: Pass ProcessOrientation.cpp's unused-by-default bools to mozilla::unused. r=mwu (e1200be54)
- Bug 1159124 - Suppress -Wunused-exception-parameter warning in nsClipboard.mm. r=spohl (dc3c4c4d0)
- Bug 1152921 - Always initialize platform-specific booleans in PrintData before sending over IPC. r=mconley (45fb8cf07)
- Bug 1091112 - Serialize nsIPrintSettings options bitfield. r=jimm (17d38b152)
- Bug 1091112 - Add OS X-specific members to PrintData IPDL struct. r=jimm (62182eb24)
- Bug 1091112 - Proxy opening the print dialog on OS X to the parent. r=mstange (adf38a12a)
- Bug 1204398 - Fix -Wshadow warnings in widget/cocoa. r=spohl (9c4f43861)
- missing bits of Bug 1193038: Purposely leak StatisticsReport object and suppress the leak report r=glandium,mccr8,njn (cc0c1a908)
- Bug 1144580 - Whitelist pselect6 in content seccomp-bpf policy. r=kang (144c67d00)
- Bug 1144514 - Whitelist pread64 in content seccomp-bpf policy. r=kang (c01f7f65c)
- Bug 1055310 - Step 1: Convert seccomp-bpf policies to Chromium PolicyCompiler. r=kang (8fbf648ba)
- Bug 1055310 - Step 2: Move SIGSYS handling to Chromium TrapRegistry. r=kang (e80ff13a6)
- Bug 1055310 - Step 3: Move syscall interceptions into SandboxFilter.cpp. r=kang (59c0b2454)
- Bug 1004011 - Support SECCOMP_FILTER_FLAG_TSYNC if available. r=kang (cf97070a9)
- Bug 1198334 (part 1) - Replace the opt-in FAIL_ON_WARNINGS with the opt-out ALLOW_COMPILER_WARNINGS. r=glandium. (c9df97498)
- Bug 1189125 - Allow xpcshell to use GTK (r=karlt) (e363a27aa)
- Bug 830801 - Part 1. Set NOMINMAX define as default. r=mshal (88fa52e9e)
- Bug 830801 - Part 3. Remove NOMINMAX define from cpp source. r=mshal (c841b399f)
- Bug 1169433 - Remove UnicharSelfTest and turn NormalizationTest into a gtest. r=glandium,smontagu (625dcaf32)
- Bug 1170072 - Part 1. Make GetCharProps1 as static function. r=jfkthame (6ab8b7c4f)
- Bug 1183209 patch 2: update data generation tools to Unicode 8, r=jfkthame (78e91de20)
- Bug 1183209 patch 3: update generated data files to Unicode 8, and adapt internal XIDMOD types to the new types in Unicode's xidmodifications.txt, r=jfkthame (c9fea054f)
2021-11-08 11:28:02 +08:00

75 lines
2.8 KiB
C++

/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
* vim: sw=2 ts=8 et :
*/
/* 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
#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"
#endif
// Code might include <new> before other wrapped headers, but <new>
// includes <exception> and so we want to wrap it. But mozalloc.h
// wants <new> also, so we break the cycle by always explicitly
// including <new> here.
#include <${NEW_HEADER_PATH}>
// 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
#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
// looks to be full generation/mutation checked iterators as done by
// _GLIBCXX_DEBUG. The latter appears to just be bounds checking, and
// is enabled by the following macros. It appears that the _DEBUG
// iterators subsume _SECURE_SCL, and the following settings are
// default anyway, so we'll just leave this commented out.
//# define _SECURE_SCL 1
//# define _SECURE_SCL_THROWS 0
#else
// Note: _SECURE_SCL iterators are on by default in opt builds. We
// could leave them on, but since gcc doesn't, we might as well
// preserve that behavior for perf reasons. nsTArray is in the same
// camp as gcc. Can revisit later.
//
// FIXME/bug 551254: because we're not wrapping all the STL headers we
// use, undefining this here can cause some headers to be built with
// iterator checking and others not. Turning this off until we have a
// better plan.
//# undef _SECURE_SCL
#endif
// C4275: When _HAS_EXCEPTIONS is set to 0, system STL header
// will generate the warning which we can't modify.
// C4530: We know that code won't be able to catch exceptions,
// but that's OK because we're not throwing them.
#pragma warning( push )
#pragma warning( disable : 4275 4530 )
#include <${HEADER_PATH}>
#pragma warning( pop )
#endif // if mozilla_${HEADER}_h