mozilla/pdf.js — pull request #1701 by brendandahl (2012-05-15 18:08:49+00:00)
Title: Fallback UI for Extension

There are currently two buttons on the fallback drop down "Download Document" and "Disable Mozilla PDF Viewer" these are open for debate and I'd like to get some more feedback from UX and Asa. I'm thinking we may not want the disable button.

Fallback UI is now triggered on any errors, warnings and TODOs. This required some refactoring of some of the various log message functions.

Overview:

- info (new) - does NOT trigger fallback ui, but logs to console
- warn - triggers fallback ui but is not fatal
- error - triggers fallback ui and is fatal
-TODO - now calls warn. Yury and I talked about getting rid of this one and just using warnings, but I'll leave it for now.
- malformed (removed)- It was only used one place besides asssertWellFormed().

Yury and I also talked about changing this around further and doing fatal(), error(), warn() since warn() better matches much of the new calls to info(). error() would be non-fatal and all the current error() calls would become fatal() and warn() would not trigger the fallback ui. Any further thoughts are welcome.

I started going through most of the warn() and TODO() calls to see if we could change any of them or ignore them, there are still quite a few and we could probably get rid of some more.

Last, we trigger the fallback UI a ton currently (even tracemonkey does).