[Pkg-javascript-commits] [pdf.js] 156/414: Fixes URL polyfill check for MS Edge.
David Prévot
taffit at moszumanska.debian.org
Tue Jun 28 17:12:16 UTC 2016
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository pdf.js.
commit bc30c42758e9920af71649845b3deab0c0d052c8
Author: Yury Delendik <ydelendik at mozilla.com>
Date: Tue Jan 26 16:49:44 2016 -0600
Fixes URL polyfill check for MS Edge.
---
src/shared/util.js | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/shared/util.js b/src/shared/util.js
index 9a99266..cdc8113 100644
--- a/src/shared/util.js
+++ b/src/shared/util.js
@@ -1697,13 +1697,15 @@ function loadJpegStream(id, imageUrl, objs) {
// feature detect for URL constructor
var hasWorkingUrl = false;
- if (typeof URL === 'function' && ('origin' in URL.prototype)) {
- try {
+ try {
+ if (typeof URL === 'function' &&
+ typeof URL.prototype === 'object' &&
+ ('origin' in URL.prototype)) {
var u = new URL('b', 'http://a');
u.pathname = 'c%20d';
hasWorkingUrl = u.href === 'http://a/c%20d';
- } catch(e) {}
- }
+ }
+ } catch(e) { }
if (hasWorkingUrl)
return;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/pdf.js.git
More information about the Pkg-javascript-commits
mailing list