mirror of
https://github.com/matrix-construct/construct
synced 2024-12-25 23:14:13 +01:00
ircd::js: #define DEBUG
internally for JS when RB_DEBUG is also set.
This commit is contained in:
parent
f2a395b879
commit
3e8aaf0c13
2 changed files with 11 additions and 0 deletions
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue