@karlden This PR has been merged and Yury put back the `do ... while` in https://github.com/yurydelendik/pdf.js/commit/48f0d0a131abbaa42b545a622c1e0e28900e7301.