mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Store the recorder script in JSTraceMonitor and make sure its traced by the GC. Also clean up the tracing of JSTraceMonitor.
This commit is contained in:
parent
02b2fde780
commit
be39054e45
@ -2860,6 +2860,14 @@ js_TraceContext(JSTracer *trc, JSContext *acx)
|
|||||||
js_TraceSharpMap(trc, &acx->sharpObjectMap);
|
js_TraceSharpMap(trc, &acx->sharpObjectMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
js_TraceTraceMonitor(JSTracer *trc, JSTraceMonitor *tm)
|
||||||
|
{
|
||||||
|
TRACE_JSVALS(trc, tm->loopTableSize, tm->loopTable, "loop table");
|
||||||
|
if (tm->recorderScriptObject)
|
||||||
|
JS_CALL_OBJECT_TRACER(trc, tm->recorderScriptObject, "recorder script object");
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
js_TraceRuntime(JSTracer *trc, JSBool allAtoms)
|
js_TraceRuntime(JSTracer *trc, JSBool allAtoms)
|
||||||
{
|
{
|
||||||
@ -2885,14 +2893,10 @@ js_TraceRuntime(JSTracer *trc, JSBool allAtoms)
|
|||||||
while ((acx = js_ContextIterator(rt, JS_FALSE, &iter)) != NULL) {
|
while ((acx = js_ContextIterator(rt, JS_FALSE, &iter)) != NULL) {
|
||||||
if (!acx->thread)
|
if (!acx->thread)
|
||||||
continue;
|
continue;
|
||||||
JSTraceMonitor* tm = &acx->thread->traceMonitor;
|
js_TraceTraceMonitor(trc, &acx->thread->traceMonitor);
|
||||||
TRACE_JSVALS(trc, tm->loopTableSize, tm->loopTable,
|
|
||||||
"thread->traceMonitor.loopTable");
|
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
JSTraceMonitor* tm = &rt->traceMonitor;
|
js_TraceTraceMonitor(trc, &rt->traceMonitor);
|
||||||
TRACE_JSVALS(trc, tm->loopTableSize, tm->loopTable,
|
|
||||||
"rt->traceMonitor.loopTable");
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,6 +57,8 @@
|
|||||||
struct JSTraceMonitor {
|
struct JSTraceMonitor {
|
||||||
jsval *loopTable;
|
jsval *loopTable;
|
||||||
uint32 loopTableSize;
|
uint32 loopTableSize;
|
||||||
|
JSScript *recorderScript;
|
||||||
|
JSObject *recorderScriptObject;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define TRACE_THRESHOLD 10
|
#define TRACE_THRESHOLD 10
|
||||||
|
Loading…
Reference in New Issue
Block a user