mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 472461 part 2 - jsgc crashes with !JS_TRACER, r=jorendorff for immediate bustage fix, and I'll get ex-post-facto review from Igor
This commit is contained in:
parent
9d2a991be0
commit
2e26c94375
@ -187,8 +187,10 @@ struct JSThread {
|
||||
/* Property cache for faster call/get/set invocation. */
|
||||
JSPropertyCache propertyCache;
|
||||
|
||||
#ifdef JS_TRACER
|
||||
/* Trace-tree JIT recorder/interpreter state. */
|
||||
JSTraceMonitor traceMonitor;
|
||||
#endif
|
||||
|
||||
/* Lock-free list of scripts created by eval to garbage-collect. */
|
||||
JSScript *scriptsToGC;
|
||||
|
@ -1834,7 +1834,11 @@ js_NewGCThing(JSContext *cx, uintN flags, size_t nbytes)
|
||||
|
||||
arenaList = &rt->gcArenaList[flindex];
|
||||
for (;;) {
|
||||
if (doGC && !JS_ON_TRACE(cx) && !JS_TRACE_MONITOR(cx).useReservedObjects) {
|
||||
if (doGC
|
||||
#ifdef JS_TRACER
|
||||
&& !JS_ON_TRACE(cx) && !JS_TRACE_MONITOR(cx).useReservedObjects
|
||||
#endif
|
||||
) {
|
||||
/*
|
||||
* Keep rt->gcLock across the call into js_GC so we don't starve
|
||||
* and lose to racing threads who deplete the heap just after
|
||||
@ -3100,6 +3104,7 @@ js_TraceRuntime(JSTracer *trc, JSBool allAtoms)
|
||||
if (rt->gcExtraRootsTraceOp)
|
||||
rt->gcExtraRootsTraceOp(trc, rt->gcExtraRootsData);
|
||||
|
||||
#ifdef JS_TRACER
|
||||
#ifdef JS_THREADSAFE
|
||||
/* Trace the loop table(s) which can contain pointers to code objects. */
|
||||
while ((acx = js_ContextIterator(rt, JS_FALSE, &iter)) != NULL) {
|
||||
@ -3110,6 +3115,7 @@ js_TraceRuntime(JSTracer *trc, JSBool allAtoms)
|
||||
#else
|
||||
js_TraceTraceMonitor(trc, &rt->traceMonitor);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user