>+ // catch faults that happen during graph building
>+ if (mParams.mDoNothing)
>+ return PR_FALSE;
>
> return PR_TRUE;
Could do return !mParams.mDoNothing;
I was worried that we'd somehow not mark everything for the JS GC, but it looks fine. If BeginCollection returns false nsXPConnect will just mark all the XPConnect JS objects (with TraceXPConnectRoots), and it won't call FinishCollection.
Comment on attachment 355654
Fault on OOM in the cycle collector, rev. 1.001
>diff --git a/xpcom/ base/nsCycleCol lector. cpp b/xpcom/ base/nsCycleCol lector. cpp
>+ // catch faults that happen during graph building mDoNothing)
>+ if (mParams.
>+ return PR_FALSE;
>
> return PR_TRUE;
Could do return !mParams. mDoNothing;
I was worried that we'd somehow not mark everything for the JS GC, but it looks fine. If BeginCollection returns false nsXPConnect will just mark all the XPConnect JS objects (with TraceXPConnectR oots), and it won't call FinishCollection.