зеркало из https://github.com/mozilla/pjs.git
Bug 377754: fixing JS_CLASS_TRACE macro and misspellings. r=brendan
This commit is contained in:
Родитель
40b93f981a
Коммит
4608a27b1b
|
@ -905,7 +905,7 @@ struct JSTracer {
|
||||||
* The method to call on each reference to a traceable thing storted in a
|
* The method to call on each reference to a traceable thing storted in a
|
||||||
* particular JSObject or other runtime structure. With DEBUG defined the
|
* particular JSObject or other runtime structure. With DEBUG defined the
|
||||||
* caller before calling JS_CallTracer must initialize JSTracer fields
|
* caller before calling JS_CallTracer must initialize JSTracer fields
|
||||||
* describing the reference using the macros bellow.
|
* describing the reference using the macros below.
|
||||||
*/
|
*/
|
||||||
extern JS_PUBLIC_API(void)
|
extern JS_PUBLIC_API(void)
|
||||||
JS_CallTracer(JSTracer *trc, void *thing, uint32 kind);
|
JS_CallTracer(JSTracer *trc, void *thing, uint32 kind);
|
||||||
|
@ -1183,7 +1183,7 @@ struct JSExtendedClass {
|
||||||
#define JSCLASS_IS_ANONYMOUS (1<<(JSCLASS_HIGH_FLAGS_SHIFT+1))
|
#define JSCLASS_IS_ANONYMOUS (1<<(JSCLASS_HIGH_FLAGS_SHIFT+1))
|
||||||
#define JSCLASS_IS_GLOBAL (1<<(JSCLASS_HIGH_FLAGS_SHIFT+2))
|
#define JSCLASS_IS_GLOBAL (1<<(JSCLASS_HIGH_FLAGS_SHIFT+2))
|
||||||
|
|
||||||
/* Idicates that JSClass.mark is a tracer with JSTraceOp type. */
|
/* Indicates that JSClass.mark is a tracer with JSTraceOp type. */
|
||||||
#define JSCLASS_MARK_IS_TRACE (1<<(JSCLASS_HIGH_FLAGS_SHIFT+3))
|
#define JSCLASS_MARK_IS_TRACE (1<<(JSCLASS_HIGH_FLAGS_SHIFT+3))
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -356,19 +356,19 @@ typedef uint32
|
||||||
*
|
*
|
||||||
* To define the tracer for a JSClass, the implementation must add
|
* To define the tracer for a JSClass, the implementation must add
|
||||||
* JSCLASS_MARK_IS_TRACE to class flags and use JS_CLASS_TRACE(method)
|
* JSCLASS_MARK_IS_TRACE to class flags and use JS_CLASS_TRACE(method)
|
||||||
* macro bellow to convert JSTraceOp to JSMarkOp when initializing or
|
* macro below to convert JSTraceOp to JSMarkOp when initializing or
|
||||||
* assigning JSClass.mark field.
|
* assigning JSClass.mark field.
|
||||||
*/
|
*/
|
||||||
typedef void
|
typedef void
|
||||||
(* JS_DLL_CALLBACK JSTraceOp)(JSTracer *trc, JSObject *obj);
|
(* JS_DLL_CALLBACK JSTraceOp)(JSTracer *trc, JSObject *obj);
|
||||||
|
|
||||||
#if defined __GNUC__ && __GNUC__ >= 4
|
#if defined __GNUC__ && __GNUC__ >= 4 && !defined __cplusplus
|
||||||
# define JS_CLASS_TRACE(method) \
|
# define JS_CLASS_TRACE(method) \
|
||||||
(__builtin_types_compatible_p(JSTraceOp, __typeof(&method)) \
|
(__builtin_types_compatible_p(JSTraceOp, __typeof(&(method))) \
|
||||||
? (JSMarkOp)(method) \
|
? (JSMarkOp)(method) \
|
||||||
: JS_WrongTypeForClassTacer)
|
: js_WrongTypeForClassTracer)
|
||||||
|
|
||||||
extern JSMarkOp JS_WrongTypeForClassTacer;
|
extern JSMarkOp js_WrongTypeForClassTracer;
|
||||||
|
|
||||||
#else
|
#else
|
||||||
# define JS_CLASS_TRACE(method) ((JSMarkOp)(method))
|
# define JS_CLASS_TRACE(method) ((JSMarkOp)(method))
|
||||||
|
|
Загрузка…
Ссылка в новой задаче