public class GlobalJavascriptInitializer
extends Object
Forgive me Kent Beck, for I have sinned.
Rhino's security model means we need to globally define it, so that horridness
has been delegated to this class.
It allows initializing the global javascript context as either sandboxed or unsafe.
If you initialize it twice and ask for different modes, an exception will be thrown
as the mode cannot be changed after initialization.
We could do some crazy stuff and build a context factory that can be hooked into after
the fact and modified, but the plan is to get rid of the ability to switch between unsafe
and sandboxed modes, and only allow sandboxed. Unsafe exists for backwards compatibility.