Skip to content

Commit 247ee02

Browse files
committed
Remove the Promise.try() polyfill
(During rebasing of the previous patches I happened to look at the polyfills and noticed that this one could be removed now.) Note: - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/try#browser_compatibility - https://bugzilla.mozilla.org/show_bug.cgi?id=1928493
1 parent b3f35b6 commit 247ee02

1 file changed

Lines changed: 0 additions & 13 deletions

File tree

src/shared/util.js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1260,19 +1260,6 @@ function fromBase64Util(str) {
12601260
return stringToBytes(atob(str));
12611261
}
12621262

1263-
// TODO: Remove this once https://bugzilla.mozilla.org/show_bug.cgi?id=1928493
1264-
// is fixed.
1265-
if (
1266-
(typeof PDFJSDev === "undefined" || PDFJSDev.test("SKIP_BABEL")) &&
1267-
typeof Promise.try !== "function"
1268-
) {
1269-
Promise.try = function (fn, ...args) {
1270-
return new Promise(resolve => {
1271-
resolve(fn(...args));
1272-
});
1273-
};
1274-
}
1275-
12761263
// TODO: Remove this once the `javascript.options.experimental.math_sumprecise`
12771264
// preference is removed from Firefox.
12781265
if (typeof Math.sumPrecise !== "function") {

0 commit comments

Comments
 (0)