hg rev 202941:c360f3d1c00d
porting most of github.com/servo/rust-mozjs across