Created attachment 566006 [details] [diff] [review]
Set the activeAnalysis flag in the proper compartment when printing TypeCompartments from js_DestroyContext with INFERFLAGS=full.
When ISpewResult is enabled, js_DestroyContext walks over all the
compartments and dumps their types. However, it doesn't switch the context
to each compartment as it does so, so the context passed in to all the
print calls may not be in the same compartment as the scripts whose type
inference results it's printing. This means that
sets the activeAnalysis flag in the wrong compartment, leading to assertion
failures in functions like js::analyze::ScriptAnalysis::slotEscapes.