mozilla/servo — pull request #2331 by Ms2ger (2014-05-05 17:41:58+00:00)
Title: Use a single JSContext per JSRuntime.

The long-term plan for SpiderMonkey is to eliminate JSContexts by merging
(most of) it into JSRuntime, so to future-proof our code, we should avoid
creating multiple JSContexts for the same JSRuntime.

However, this implies we'll have to use the same JSContext for objects in
different compartments, so we need to enter compartments. This is done by
using the with_compartment function.