bool js::math_abs_handle(JSContext *cx, js::HandleValue v, js::MutableHandleValue r) { double x; if (!ToNumber(cx, v, &x)) return false; double z = Abs(x); r.setNumber(z); return true; }
bool JSAudioContext::JSGetter_volume(JSContext *cx, JS::MutableHandleValue vp) { vp.setNumber(m_Audio->getVolume()); return true; }