Hm. I also see that they changes this upstream. Now it is [ensureDoc](https://github.com/mozilla/pdf.js/blob/master/src/core/worker.js#L34).