pub(crate) fn convert_chunk_to_vec( cx: JSContext, chunk: HandleValue<'_>, ) -> Result<Vec<u8>, Error>