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);
|
||||
}
|
||||
|
||||
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
|
||||
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) {
|
||||
if (!acx->thread)
|
||||
continue;
|
||||
JSTraceMonitor* tm = &acx->thread->traceMonitor;
|
||||
TRACE_JSVALS(trc, tm->loopTableSize, tm->loopTable,
|
||||
"thread->traceMonitor.loopTable");
|
||||
js_TraceTraceMonitor(trc, &acx->thread->traceMonitor);
|
||||
}
|
||||
#else
|
||||
JSTraceMonitor* tm = &rt->traceMonitor;
|
||||
TRACE_JSVALS(trc, tm->loopTableSize, tm->loopTable,
|
||||
"rt->traceMonitor.loopTable");
|
||||
js_TraceTraceMonitor(trc, &rt->traceMonitor);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -57,6 +57,8 @@
|
||||
struct JSTraceMonitor {
|
||||
jsval *loopTable;
|
||||
uint32 loopTableSize;
|
||||
JSScript *recorderScript;
|
||||
JSObject *recorderScriptObject;
|
||||
};
|
||||
|
||||
#define TRACE_THRESHOLD 10
|
||||
|
Loading…
Reference in New Issue
Block a user