m_doesGC is only needed for ENABLE(DFG_DOES_GC_VALIDATION), and is used for checking if the VM thread's execution is in a state that can allow GC to run. Hence, it is more related to VM thread execution as opposed to the state of the Heap. This patch moves m_doesGC from Heap to VM to get it out of the way of upcoming Global GC work. Also change DeferGC and DeferGCForAWhile to take a VM& instead of a Heap&. DeferGC needs to access VM& in order to call VM::verifyCanGC(). DeferGCForAWhile does not need VM&, but we're changing it to be consistent with DeferGC. There should be no perf impact for this change.
<rdar://problem/85277492>
Created attachment 443885 [details] proposed patch.
Thanks for the review. Landed in r285636: <http://trac.webkit.org/r285636>.