It would be a huge help if someone could go and document the various compartment methods on MDC like: JS_NewCompartmentAndGlobalObject JS_LeaveCrossCompartmentCall JS_EnterCrossCompartmentCall
I started this on the main JSAPI reference page, in the "Runtimes and Contexts" section, under a "Compartments" subheader. The API docs I just wrote seem kind of terse and hard to understand without some kind of introduction to compartments. Anyway, let me know what you think, whether it's at all useful yet, what else might need to be said, and what questions are left unanswered.
These have since been documented.