Merge pull request #477 from arturadib/sanity-checks

Sanity checks
This commit is contained in:
Chris Jones 2011-09-14 21:56:34 -07:00
commit 3006c090ad
2 changed files with 5 additions and 1 deletions

View File

@ -1291,6 +1291,10 @@ var Font = (function Font() {
window.btoa(data) + ');');
var rule = "@font-face { font-family:'" + fontName + "';src:" + url + '}';
var styleSheet = document.styleSheets[0];
if (!styleSheet) {
document.documentElement.firstChild.appendChild( document.createElement('style') );
styleSheet = document.styleSheets[0];
}
styleSheet.insertRule(rule, styleSheet.cssRules.length);
return rule;

2
pdf.js
View File

@ -3379,7 +3379,7 @@ var Page = (function() {
} catch (e) {
exc = e.toString();
}
continuation(exc);
if (continuation) continuation(exc);
});
};