Disable a small bit of debug code when compiling with MSVC as a temporary workaround for a compiler bug. Hopefully a semantically-equivalent workaround can be found in the longer term, but in the short term this at least makes debug Windows shell builds compile again, in a way dmandelin thinks is at least not unreasonable. Another followup to bug 745472, split out for clarity, r=themaid

--HG--
extra : rebase_source : 3f211be919bbc567167859daabb4c41ef2677fbe
This commit is contained in:
Jeff Walden 2012-05-03 19:17:19 -07:00
parent 86d0005dc0
commit 6c0b5b116e

View File

@ -1229,10 +1229,22 @@ JS_PUBLIC_API(bool)
ToNumberSlow(JSContext *cx, Value v, double *out)
{
#ifdef DEBUG
/*
* MSVC bizarrely miscompiles this, complaining about the first brace below
* being unmatched (!). The error message points at both this opening brace
* and at the corresponding SkipRoot constructor. The error seems to derive
* from the presence guard-object macros on the SkipRoot class/constructor,
* which seems well in the weeds for an unmatched-brace syntax error.
* Otherwise the problem is inscrutable, and I haven't found a workaround.
* So for now just disable it when compiling with MSVC -- not ideal, but at
* least Windows debug shell builds complete again.
*/
#ifndef _MSC_VER
{
SkipRoot skip(cx, &v);
MaybeCheckStackRoots(cx);
}
#endif
#endif
JS_ASSERT(!v.isNumber());