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 331053 57356e7b5e91412e0e616d47de8649c348214791
parent 331052 f4ffff32d7f46eb78bdaac0c2fd871f2dc1a26ad
child 331054 c805161da79c471e266e8db70ca4e8b18b697e29
push id9858
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 14:37:10 +0000
treeherdermozilla-aurora@203106ef6cb6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjorendorff
bugs1264403
milestone50.0a1
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