mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 553671 part 10 - Get rid of "goto restart_at_beginning;". r=luke.
--HG-- extra : rebase_source : 9d0128640af7d366133d59fed9c21160078ba5ca
This commit is contained in:
parent
ac7bf3b598
commit
e3724fb9c0
@ -3520,28 +3520,33 @@ js_GC(JSContext *cx, JSGCInvocationKind gckind)
|
||||
#endif
|
||||
TIMESTAMP(gcTimer.enter);
|
||||
|
||||
restart_at_beginning:
|
||||
if (!FireGCBegin(cx, gckind))
|
||||
return;
|
||||
for (;;) {
|
||||
if (!FireGCBegin(cx, gckind))
|
||||
return;
|
||||
|
||||
/* Lock out other GC allocator and collector invocations. */
|
||||
if (!(gckind & GC_LOCK_HELD))
|
||||
JS_LOCK_GC(rt);
|
||||
{
|
||||
/* Lock out other GC allocator and collector invocations. */
|
||||
Conditionally<AutoLockGC> lockIf(!(gckind & GC_LOCK_HELD), rt);
|
||||
|
||||
if (!BeginGCSession(cx, gckind)) {
|
||||
/* We're already doing GC or another thread did GC for us. */
|
||||
if (!(gckind & GC_LOCK_HELD))
|
||||
JS_UNLOCK_GC(rt);
|
||||
return;
|
||||
}
|
||||
if (!BeginGCSession(cx, gckind)) {
|
||||
/* We're already doing GC or another thread did GC for us. */
|
||||
return;
|
||||
}
|
||||
|
||||
if (gckind == GC_SET_SLOT_REQUEST && !ProcessAllSetSlotRequests(cx, &gckind))
|
||||
return;
|
||||
if (gckind == GC_SET_SLOT_REQUEST && !ProcessAllSetSlotRequests(cx, &gckind))
|
||||
return;
|
||||
|
||||
if (gckind != GC_SET_SLOT_REQUEST) {
|
||||
if (!JS_ON_TRACE(cx))
|
||||
GCUntilDone(cx, gckind GCTIMER_ARG);
|
||||
rt->setGCLastBytes(rt->gcBytes);
|
||||
if (gckind != GC_SET_SLOT_REQUEST) {
|
||||
if (!JS_ON_TRACE(cx))
|
||||
GCUntilDone(cx, gckind GCTIMER_ARG);
|
||||
rt->setGCLastBytes(rt->gcBytes);
|
||||
}
|
||||
|
||||
EndGCSession(cx);
|
||||
}
|
||||
|
||||
if (FireGCEnd(cx, gckind))
|
||||
break;
|
||||
}
|
||||
|
||||
EndGCSession(cx);
|
||||
|
Loading…
Reference in New Issue
Block a user