Bug 1264403 - Check for JS_DEBUG/DEBUG mismatch at compile time, r=jorendorff
authorSteve Fink <sfink@mozilla.com>
Wed, 20 Jul 2016 18:49:38 -0700
changeset 346019 57356e7b5e91412e0e616d47de8649c348214791
parent 346018 f4ffff32d7f46eb78bdaac0c2fd871f2dc1a26ad
child 346020 c805161da79c471e266e8db70ca4e8b18b697e29
push id6389
push userraliiev@mozilla.com
push dateMon, 19 Sep 2016 13:38:22 +0000
treeherdermozilla-beta@01d67bfe6c81 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjorendorff
bugs1264403
milestone50.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 1264403 - Check for JS_DEBUG/DEBUG mismatch at compile time, r=jorendorff MozReview-Commit-ID: FLzuWvrIbAG
js/src/js-config.h.in
--- a/js/src/js-config.h.in
+++ b/js/src/js-config.h.in
@@ -10,16 +10,26 @@
 
 /* Definitions set at build time that affect SpiderMonkey's public API.
    This header file is generated by the SpiderMonkey configure script,
    and installed along with jsapi.h.  */
 
 /* Define to 1 if SpiderMonkey is in debug mode. */
 #undef JS_DEBUG
 
+#ifdef JS_DEBUG
+# ifndef DEBUG
+#  error "SpiderMonkey was configured with --enable-debug, so DEBUG must be defined when including this header"
+# endif
+#else
+# ifdef DEBUG
+#  error "SpiderMonkey was configured with --disable-debug, so DEBUG must be not defined when including this header"
+# endif
+#endif
+
 /* Define to 1 if SpiderMonkey should not use struct types in debug builds. */
 #undef JS_NO_JSVAL_JSID_STRUCT_TYPES
 
 /* Define to 1 if SpiderMonkey should support multi-threaded clients.  */
 #undef JS_THREADSAFE
 
 /* Define to 1 if SpiderMonkey should include ctypes support.  */
 #undef JS_HAS_CTYPES