jsapi-util-error: Enter the global object compartment

If another compartment throws an exception we set properties
on our global object so enter its compartment.