mozilla/pdf.js — pull request #1909 by benbro (2012-07-18 18:45:13+00:00)
Title: Prevent the error callback from being called twice when getPdf fails because of a 404 from the server

When the server returns 404 because of a missing pdf doc, getPdf calls the error callback twice which leads to two rejection of the promise which throws an error.

To reproduce this issue I changed helloworld.pdf to helloworld2.pdf
http://jsbin.com/ofisex/edit#javascript,html,live

Thanks