author Nicholas D. Matsakis <>
Tue, 06 Nov 2012 22:32:01 -0500
changeset 120446 651dc9d52259884f7c3924334581530a85fa2dcb
parent 106882 21c3069ddc4a9d294de06151a7d3486577b1429a
child 142047 abaf789d8030afc528c0e7f636b8689fba0aa981
permissions -rw-r--r--
Bug 807480 - Add Rooted<T> roots to PerThread state. r=luke Currently there are a number of global fields in JSRuntime* which are basically tracking per-thread state. This makes sense on the current trunk since there is only ever a single thread associated with a runtime, but as Parallel JS (nee Rivertrail) starts to land this assumption no longer holds. This patch makes a struct, currently called |JS::PerThreadData|, that stores per-thread data from the runtime. There is one instance of this struct embedded in "Runtime" itself (the field |mainThread|). For now I have only migrated the debug GC fields into |PerThread|, those are the ones causing me immediate pain. Eventually more fields will want to move into there. The eventual goal is to distinguish thread-safe code, which will take as argument a |JS::PerThread*|, from non-thread-safe code, which will take a |JSRuntime*| or |JSContext*|.

/* List of defines generated by configure. Included with preprocessor flag,
 * -include, to avoid long list of -D defines on the compile command-line.
 * Do not edit.



/* The c99 defining the limit macros (UINT32_MAX for example), says:
 * C++ implementations should define these macros only when __STDC_LIMIT_MACROS
 * is defined before <stdint.h> is included. */

/* Force-include hunspell_alloc_hooks.h for hunspell, so that we don't need to
 * modify it directly.
 * HUNSPELL_STATIC is defined in extensions/spellcheck/hunspell/src/,
 * unless --enable-system-hunspell is defined.
#if defined(HUNSPELL_STATIC)
#include "hunspell_alloc_hooks.h"

#endif /* _MOZILLA_CONFIG_H_ */