зеркало из https://github.com/mozilla/gecko-dev.git
BUG 545303: TM: non API function for JS_CallTracer r=igor
This commit is contained in:
Родитель
f5da60d48d
Коммит
013748abe4
|
@ -1908,6 +1908,12 @@ JS_TraceRuntime(JSTracer *trc)
|
|||
js_TraceRuntime(trc, allAtoms);
|
||||
}
|
||||
|
||||
JS_PUBLIC_API(void)
|
||||
JS_CallTracer(JSTracer *trc, void *thing, uint32 kind)
|
||||
{
|
||||
js_CallGCMarker(trc, thing, kind);
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
|
||||
#ifdef HAVE_XPCONNECT
|
||||
|
|
|
@ -1216,7 +1216,7 @@ array_trace(JSTracer *trc, JSObject *obj)
|
|||
v = obj->dslots[i];
|
||||
if (JSVAL_IS_TRACEABLE(v)) {
|
||||
JS_SET_TRACING_INDEX(trc, "array_dslots", i);
|
||||
JS_CallTracer(trc, JSVAL_TO_TRACEABLE(v), JSVAL_TRACE_KIND(v));
|
||||
js_CallGCMarker(trc, JSVAL_TO_TRACEABLE(v), JSVAL_TRACE_KIND(v));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -537,8 +537,8 @@ js_locked_atom_tracer(JSDHashTable *table, JSDHashEntryHdr *hdr,
|
|||
return JS_DHASH_NEXT;
|
||||
}
|
||||
JS_SET_TRACING_INDEX(trc, "locked_atom", (size_t)number);
|
||||
JS_CallTracer(trc, ATOM_ENTRY_KEY(entry),
|
||||
IS_STRING_TABLE(table) ? JSTRACE_STRING : JSTRACE_DOUBLE);
|
||||
js_CallGCMarker(trc, ATOM_ENTRY_KEY(entry),
|
||||
IS_STRING_TABLE(table) ? JSTRACE_STRING : JSTRACE_DOUBLE);
|
||||
return JS_DHASH_NEXT;
|
||||
}
|
||||
|
||||
|
@ -557,7 +557,7 @@ js_pinned_atom_tracer(JSDHashTable *table, JSDHashEntryHdr *hdr,
|
|||
? "pinned_atom"
|
||||
: "interned_atom",
|
||||
(size_t)number);
|
||||
JS_CallTracer(trc, ATOM_ENTRY_KEY(entry), JSTRACE_STRING);
|
||||
js_CallGCMarker(trc, ATOM_ENTRY_KEY(entry), JSTRACE_STRING);
|
||||
}
|
||||
return JS_DHASH_NEXT;
|
||||
}
|
||||
|
|
|
@ -3036,7 +3036,7 @@ trace_local_names_enumerator(JSDHashTable *table, JSDHashEntryHdr *hdr,
|
|||
JS_SET_TRACING_INDEX(trc,
|
||||
entry->localKind == JSLOCAL_ARG ? "arg" : "var",
|
||||
entry->index);
|
||||
JS_CallTracer(trc, ATOM_TO_STRING(entry->name), JSTRACE_STRING);
|
||||
js_CallGCMarker(trc, ATOM_TO_STRING(entry->name), JSTRACE_STRING);
|
||||
return JS_DHASH_NEXT;
|
||||
}
|
||||
|
||||
|
@ -3061,7 +3061,7 @@ TraceLocalNames(JSTracer *trc, JSFunction *fun)
|
|||
JS_SET_TRACING_INDEX(trc,
|
||||
i < fun->nargs ? "arg" : "var",
|
||||
i < fun->nargs ? i : i - fun->nargs);
|
||||
JS_CallTracer(trc, ATOM_TO_STRING(atom), JSTRACE_STRING);
|
||||
js_CallGCMarker(trc, ATOM_TO_STRING(atom), JSTRACE_STRING);
|
||||
}
|
||||
} while (i != 0);
|
||||
} else {
|
||||
|
|
|
@ -2067,8 +2067,8 @@ MarkDelayedChildren(JSTracer *trc)
|
|||
JS_ASSERT(rt->gcMarkLaterCount == 0);
|
||||
}
|
||||
|
||||
JS_PUBLIC_API(void)
|
||||
JS_CallTracer(JSTracer *trc, void *thing, uint32 kind)
|
||||
void
|
||||
js_CallGCMarker(JSTracer *trc, void *thing, uint32 kind)
|
||||
{
|
||||
JSContext *cx;
|
||||
JSRuntime *rt;
|
||||
|
@ -2186,7 +2186,7 @@ js_CallValueTracerIfGCThing(JSTracer *trc, jsval v)
|
|||
} else {
|
||||
return;
|
||||
}
|
||||
JS_CallTracer(trc, thing, kind);
|
||||
js_CallGCMarker(trc, thing, kind);
|
||||
}
|
||||
|
||||
static JSDHashOperator
|
||||
|
@ -2267,8 +2267,8 @@ gc_lock_traversal(JSDHashTable *table, JSDHashEntryHdr *hdr, uint32 num,
|
|||
_v = *_vp; \
|
||||
if (JSVAL_IS_TRACEABLE(_v)) { \
|
||||
JS_SET_TRACING_INDEX(trc, name, _vp - (vec)); \
|
||||
JS_CallTracer(trc, JSVAL_TO_TRACEABLE(_v), \
|
||||
JSVAL_TRACE_KIND(_v)); \
|
||||
js_CallGCMarker(trc, JSVAL_TO_TRACEABLE(_v), \
|
||||
JSVAL_TRACE_KIND(_v)); \
|
||||
} \
|
||||
} \
|
||||
JS_END_MACRO
|
||||
|
|
|
@ -230,6 +230,9 @@ typedef enum JSGCInvocationKind {
|
|||
extern void
|
||||
js_GC(JSContext *cx, JSGCInvocationKind gckind);
|
||||
|
||||
extern void
|
||||
js_CallGCMarker(JSTracer *trc, void *thing, uint32 kind);
|
||||
|
||||
/*
|
||||
* The kind of GC thing with a finalizer. The external strings follow the
|
||||
* ordinary string to simplify js_GetExternalStringGCType.
|
||||
|
|
|
@ -6612,7 +6612,7 @@ js_TraceObject(JSTracer *trc, JSObject *obj)
|
|||
jsval v = STOBJ_GET_SLOT(obj, i);
|
||||
if (JSVAL_IS_TRACEABLE(v)) {
|
||||
JS_SET_TRACING_DETAILS(trc, js_PrintObjectSlotName, obj, i);
|
||||
JS_CallTracer(trc, JSVAL_TO_TRACEABLE(v), JSVAL_TRACE_KIND(v));
|
||||
js_CallGCMarker(trc, JSVAL_TO_TRACEABLE(v), JSVAL_TRACE_KIND(v));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1788,18 +1788,18 @@ JSScopeProperty::trace(JSTracer *trc)
|
|||
if (attrs & (JSPROP_GETTER | JSPROP_SETTER)) {
|
||||
if ((attrs & JSPROP_GETTER) && getter) {
|
||||
JS_SET_TRACING_DETAILS(trc, PrintPropertyGetterOrSetter, this, 0);
|
||||
JS_CallTracer(trc, getterObject(), JSTRACE_OBJECT);
|
||||
js_CallGCMarker(trc, getterObject(), JSTRACE_OBJECT);
|
||||
}
|
||||
if ((attrs & JSPROP_SETTER) && setter) {
|
||||
JS_SET_TRACING_DETAILS(trc, PrintPropertyGetterOrSetter, this, 1);
|
||||
JS_CallTracer(trc, setterObject(), JSTRACE_OBJECT);
|
||||
js_CallGCMarker(trc, setterObject(), JSTRACE_OBJECT);
|
||||
}
|
||||
}
|
||||
#endif /* JS_HAS_GETTER_SETTER */
|
||||
|
||||
if (isMethod()) {
|
||||
JS_SET_TRACING_DETAILS(trc, PrintPropertyMethod, this, 0);
|
||||
JS_CallTracer(trc, methodObject(), JSTRACE_OBJECT);
|
||||
js_CallGCMarker(trc, methodObject(), JSTRACE_OBJECT);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1788,7 +1788,7 @@ js_TraceScript(JSTracer *trc, JSScript *script)
|
|||
v = ATOM_KEY(vector[i]);
|
||||
if (JSVAL_IS_TRACEABLE(v)) {
|
||||
JS_SET_TRACING_INDEX(trc, "atomMap", i);
|
||||
JS_CallTracer(trc, JSVAL_TO_TRACEABLE(v), JSVAL_TRACE_KIND(v));
|
||||
js_CallGCMarker(trc, JSVAL_TO_TRACEABLE(v), JSVAL_TRACE_KIND(v));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1799,7 +1799,7 @@ js_TraceScript(JSTracer *trc, JSScript *script)
|
|||
--i;
|
||||
if (objarray->vector[i]) {
|
||||
JS_SET_TRACING_INDEX(trc, "objects", i);
|
||||
JS_CallTracer(trc, objarray->vector[i], JSTRACE_OBJECT);
|
||||
js_CallGCMarker(trc, objarray->vector[i], JSTRACE_OBJECT);
|
||||
}
|
||||
} while (i != 0);
|
||||
}
|
||||
|
@ -1811,14 +1811,14 @@ js_TraceScript(JSTracer *trc, JSScript *script)
|
|||
--i;
|
||||
if (objarray->vector[i]) {
|
||||
JS_SET_TRACING_INDEX(trc, "regexps", i);
|
||||
JS_CallTracer(trc, objarray->vector[i], JSTRACE_OBJECT);
|
||||
js_CallGCMarker(trc, objarray->vector[i], JSTRACE_OBJECT);
|
||||
}
|
||||
} while (i != 0);
|
||||
}
|
||||
|
||||
if (script->u.object) {
|
||||
JS_SET_TRACING_NAME(trc, "object");
|
||||
JS_CallTracer(trc, script->u.object, JSTRACE_OBJECT);
|
||||
js_CallGCMarker(trc, script->u.object, JSTRACE_OBJECT);
|
||||
}
|
||||
|
||||
if (IS_GC_MARKING_TRACER(trc) && script->filename)
|
||||
|
|
|
@ -2693,7 +2693,7 @@ MarkTree(JSTracer* trc, TreeFragment *f)
|
|||
while (len--) {
|
||||
jsval v = *vp++;
|
||||
JS_SET_TRACING_NAME(trc, "jitgcthing");
|
||||
JS_CallTracer(trc, JSVAL_TO_TRACEABLE(v), JSVAL_TRACE_KIND(v));
|
||||
js_CallGCMarker(trc, JSVAL_TO_TRACEABLE(v), JSVAL_TRACE_KIND(v));
|
||||
}
|
||||
JSScopeProperty** spropp = f->sprops.data();
|
||||
len = f->sprops.length();
|
||||
|
|
|
@ -4797,7 +4797,7 @@ xml_trace_vector(JSTracer *trc, JSXML **vec, uint32 len)
|
|||
xml = vec[i];
|
||||
if (xml) {
|
||||
JS_SET_TRACING_INDEX(trc, "xml_vector", i);
|
||||
JS_CallTracer(trc, xml, JSTRACE_XML);
|
||||
js_CallGCMarker(trc, xml, JSTRACE_XML);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5894,7 +5894,7 @@ TraceObjectVector(JSTracer *trc, JSObject **vec, uint32 len)
|
|||
obj = vec[i];
|
||||
if (obj) {
|
||||
JS_SET_TRACING_INDEX(trc, "vector", i);
|
||||
JS_CallTracer(trc, obj, JSTRACE_OBJECT);
|
||||
js_CallGCMarker(trc, obj, JSTRACE_OBJECT);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче