Bug 1111244 - Remove some code specific to old unsupported MSVC versions from js/src; r=Waldo

--HG--
extra : rebase_source : b561f5b2102af350d18792423490512faaa5730a
This commit is contained in:
Ehsan Akhgari 2014-12-15 15:43:50 -05:00
parent 21c5ccfd08
commit 33adc4717c
3 changed files with 6 additions and 12 deletions

View File

@ -104,7 +104,7 @@
***********************************************************************/
#define JS_BEGIN_MACRO do {
#if defined(_MSC_VER) && _MSC_VER >= 1400
#if defined(_MSC_VER)
# define JS_END_MACRO \
} __pragma(warning(push)) __pragma(warning(disable:4127)) \
while (0) __pragma(warning(pop))

View File

@ -24,14 +24,8 @@
#include <windef.h>
#include <winbase.h>
#include <mmsystem.h> /* for timeBegin/EndPeriod */
/* VC++ 8.0 or later */
#if _MSC_VER >= 1400
#define NS_HAVE_INVALID_PARAMETER_HANDLER 1
#endif
#ifdef NS_HAVE_INVALID_PARAMETER_HANDLER
#include <crtdbg.h> /* for _CrtSetReportMode */
#include <stdlib.h> /* for _set_invalid_parameter_handler */
#endif
#include "prinit.h"
@ -253,7 +247,7 @@ PRMJ_Now()
}
#endif
#ifdef NS_HAVE_INVALID_PARAMETER_HANDLER
#ifdef XP_WIN
static void
PRMJ_InvalidParameterHandler(const wchar_t *expression,
const wchar_t *function,
@ -273,7 +267,7 @@ PRMJ_FormatTime(char *buf, int buflen, const char *fmt, PRMJTime *prtm)
#if defined(XP_UNIX) || defined(XP_WIN)
struct tm a;
int fake_tm_year = 0;
#ifdef NS_HAVE_INVALID_PARAMETER_HANDLER
#ifdef XP_WIN
_invalid_parameter_handler oldHandler;
int oldReportMode;
#endif
@ -347,14 +341,14 @@ PRMJ_FormatTime(char *buf, int buflen, const char *fmt, PRMJTime *prtm)
* changeover time.)
*/
#ifdef NS_HAVE_INVALID_PARAMETER_HANDLER
#ifdef XP_WIN
oldHandler = _set_invalid_parameter_handler(PRMJ_InvalidParameterHandler);
oldReportMode = _CrtSetReportMode(_CRT_ASSERT, 0);
#endif
result = strftime(buf, buflen, fmt, &a);
#ifdef NS_HAVE_INVALID_PARAMETER_HANDLER
#ifdef XP_WIN
_set_invalid_parameter_handler(oldHandler);
_CrtSetReportMode(_CRT_ASSERT, oldReportMode);
#endif

View File

@ -268,7 +268,7 @@ js::NativeObject::slotInRange(uint32_t slot, SentinelAllowed sentinel) const
}
#endif /* DEBUG */
#if defined(_MSC_VER) && _MSC_VER >= 1500
#if defined(_MSC_VER)
/*
* Work around a compiler bug in MSVC9 and above, where inlining this function
* causes stack pointer offsets to go awry and spp to refer to something higher