Backed out changeset 865a34953fb5 (bug 1324093)
authorIris Hsiao <ihsiao@mozilla.com>
Fri, 13 Jan 2017 10:51:29 +0800
changeset 329218 2b2ae61e73f5d2e47403a4c891d613bf31561914
parent 329217 a991fee52cc9bc4fc72af3500a236c43cb50e612
child 329219 bee517272e14ea1817b7b3f1ecfaa98b022ee242
child 329276 91f5293e9a89056565493ed5073c3842b0ee9fdc
push id85663
push userihsiao@mozilla.com
push dateFri, 13 Jan 2017 02:51:45 +0000
treeherdermozilla-inbound@2b2ae61e73f5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1324093
milestone53.0a1
backs out865a34953fb530f32a31fa1915be9a0aa1f3941a
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
Backed out changeset 865a34953fb5 (bug 1324093)
mfbt/Assertions.h
--- a/mfbt/Assertions.h
+++ b/mfbt/Assertions.h
@@ -49,21 +49,25 @@ AnnotateMozCrashReason(const char* reaso
 #include <stdlib.h>
 #ifdef WIN32
    /*
     * TerminateProcess and GetCurrentProcess are defined in <winbase.h>, which
     * further depends on <windef.h>.  We hardcode these few definitions manually
     * because those headers clutter the global namespace with a significant
     * number of undesired macros and symbols.
     */
-MOZ_BEGIN_EXTERN_C
+#  ifdef __cplusplus
+extern "C" {
+#  endif
 __declspec(dllimport) int __stdcall
 TerminateProcess(void* hProcess, unsigned int uExitCode);
 __declspec(dllimport) void* __stdcall GetCurrentProcess(void);
-MOZ_END_EXTERN_C
+#  ifdef __cplusplus
+}
+#  endif
 #else
 #  include <signal.h>
 #endif
 #ifdef ANDROID
 #  include <android/log.h>
 #endif
 
 /*
@@ -133,17 +137,19 @@ MOZ_END_EXTERN_C
        extern void MOZ_STATIC_ASSERT_GLUE(moz_static_assert, __LINE__)(int arg[(cond) ? 1 : -1]) MOZ_STATIC_ASSERT_UNUSED_ATTRIBUTE
 #  endif
 
 #define MOZ_STATIC_ASSERT_IF(cond, expr, reason)  MOZ_STATIC_ASSERT(!(cond) || (expr), reason)
 #else
 #define MOZ_STATIC_ASSERT_IF(cond, expr, reason)  static_assert(!(cond) || (expr), reason)
 #endif
 
-MOZ_BEGIN_EXTERN_C
+#ifdef __cplusplus
+extern "C" {
+#endif
 
 /*
  * Prints |aStr| as an assertion failure (using aFilename and aLine as the
  * location of the assertion) to the standard debug-output channel.
  *
  * Usually you should use MOZ_ASSERT or MOZ_CRASH instead of this method.  This
  * method is primarily for internal use in this header, and only secondarily
  * for use in implementing release-build assertions.
@@ -275,17 +281,19 @@ MOZ_ReportCrash(const char* aStr, const 
 #  define MOZ_CRASH(...) \
      do { \
        MOZ_ReportCrash("" __VA_ARGS__, __FILE__, __LINE__); \
        MOZ_CRASH_ANNOTATE("MOZ_CRASH(" __VA_ARGS__ ")"); \
        MOZ_REALLY_CRASH(); \
      } while (0)
 #endif
 
-MOZ_END_EXTERN_C
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
 
 /*
  * MOZ_ASSERT(expr [, explanation-string]) asserts that |expr| must be truthy in
  * debug builds.  If it is, execution continues.  Otherwise, an error message
  * including the expression and the explanation-string (if provided) is printed,
  * an attempt is made to invoke any existing debugger, and execution halts.
  * MOZ_ASSERT is fatal: no recovery is possible.  Do not assert a condition
  * which can correctly be falsy.