Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure that the viewer loads even if there are errors when the preferences are read #4693

Merged
merged 1 commit into from
Apr 28, 2014
Merged

Ensure that the viewer loads even if there are errors when the preferences are read #4693

merged 1 commit into from
Apr 28, 2014

Conversation

Snuffleupagus
Copy link
Collaborator

While trying to debug #4690, I stumbled on another issue.
Currently if e.g. Preferences._readFromStorage fails, the PDF document will fail to load. This PR adds missing rejection handler functions, to avoid this issue. (I assumed that it was best to handle this on the caller side, rather than in Preferences.)

this.handTool.activate();
}
}.bind(this));
}.bind(this), function rejected(errorMsg) {});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's just suppressing the unhandled exception error message, right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but this seems to be enough to let the viewer load (it works fine in my testing).
If you prefer another solution, I'm open to suggestions!

@yurydelendik
Copy link
Contributor

/botio-linux preview

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

Command cmd_preview from @yurydelendik received. Current queue size: 0

Live output at: http://107.21.233.14:8877/ffabb34c43fd891/output.txt

yurydelendik added a commit that referenced this pull request Apr 28, 2014
Ensure that the viewer loads even if there are errors when the preferences are read
@yurydelendik yurydelendik merged commit 2cdb18b into mozilla:master Apr 28, 2014
@yurydelendik
Copy link
Contributor

Thanks

@Snuffleupagus Snuffleupagus deleted the preferences-reject branch April 28, 2014 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants