0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-02 18:18:56 +02:00

ircd::js: #define DEBUG internally for JS when RB_DEBUG is also set.

This commit is contained in:
Jason Volk 2016-11-24 18:36:45 -08:00
parent f2a395b879
commit 3e8aaf0c13
2 changed files with 11 additions and 0 deletions

View file

@ -33,6 +33,14 @@
#pragma once
#define HAVE_IRCD_JS_JS_H
// SpiderMonkey makes use of the `DEBUG` define in headers which must match what the bottom
// end was also compiled with. We tie that define to RB_DEBUG controlled by --enable-debug.
// From a completely clean build, configuring IRCd with --enable-debug should compile SpiderMonkey
// in debug as well.
#ifdef RB_DEBUG
#define DEBUG
#endif
// SpiderMonkey headers require an include basis e.g. -I/usr/include/mozjs-XX as their
// include directives are written as "jsxxx.h" or "mozilla/xxx.h" etc. Our includes are all
// <ircd/xxx.h> and shouldn't have any conflict issues.

View file

@ -137,6 +137,9 @@ js::ReportOutOfMemory(ExclusiveContext *const c)
std::terminate();
}
// This was only ever defined for the SpiderMonkey headers and some of our hacks above.
#undef DEBUG
///////////////////////////////////////////////////////////////////////////////
//
// ircd/js/js.h - With 3rd party (JSAPI) symbols