Break bad old nested include cycle for good, by un-nesting (420554, r=jorendorff, a=vlad).

This commit is contained in:
brendan@mozilla.org 2008-03-04 15:40:10 -08:00
parent 31ebe6afa1
commit 31acde75c0
6 changed files with 5 additions and 21 deletions

View File

@ -50,10 +50,7 @@
#include "jsapi.h"
#include "jsprvtd.h"
#include "jspubtd.h"
#ifdef JS_THREADSAFE
#include "jslock.h"
#endif
JS_BEGIN_EXTERN_C

View File

@ -57,7 +57,9 @@
#include "jsfun.h"
#include "jsinterp.h"
#include "jsnum.h"
#include "jsobj.h"
#include "jsopcode.h"
#include "jsscope.h"
#include "jsscript.h"
/* Forward declarations for js_ErrorClass's initializer. */

View File

@ -129,24 +129,6 @@ struct JSTitle {
#define JS_NOTIFY_CONDVAR(cv) PR_NotifyCondVar(cv)
#define JS_NOTIFY_ALL_CONDVAR(cv) PR_NotifyAllCondVar(cv)
/*
* Include jsscope.h so JS_LOCK_OBJ macro callers don't have to include it.
* Since there is a JSThinLock member in JSScope, we can't nest this include
* much earlier (see JSThinLock's typedef, above). Yes, that means there is
* an #include cycle between jslock.h and jsscope.h: moderate-sized XXX here,
* to be fixed by moving JS_LOCK_SCOPE to jsscope.h, JS_LOCK_OBJ to jsobj.h,
* and so on.
*
* We also need jsscope.h #ifdef JS_DEBUG_TITLE_LOCKS for SET_OBJ_INFO and
* SET_SCOPE_INFO, but we do not want any nested includes that depend on DEBUG.
* Those lead to build bustage when someone makes a change that depends in a
* subtle way on jsscope.h being included directly or indirectly, but does not
* test by building optimized as well as DEBUG.
*/
JS_END_EXTERN_C
#include "jsscope.h"
JS_BEGIN_EXTERN_C
#ifdef JS_DEBUG_TITLE_LOCKS
#define SET_OBJ_INFO(obj_, file_, line_) \

View File

@ -63,6 +63,7 @@
#include "jsobj.h"
#include "jsopcode.h"
#include "jsprf.h"
#include "jsscope.h"
#include "jsstr.h"
static JSBool

View File

@ -62,6 +62,7 @@
#include "jsopcode.h"
#include "jsregexp.h"
#include "jsscan.h"
#include "jsscope.h"
#include "jsstr.h"
typedef enum REOp {

View File

@ -68,6 +68,7 @@
#include "jsobj.h"
#include "jsopcode.h"
#include "jsregexp.h"
#include "jsscope.h"
#include "jsstr.h"
#include "jsbit.h"