Skip to content

Commit ea4fe68

Browse files
authored
Merge pull request #21405 from Snuffleupagus/scripting-rm-getOrInsertComputed-polyfill
Remove the `Map.prototype.getOrInsertComputed` polyfill from the scripting implementation (PR 21399 follow-up)
2 parents 8794372 + 5f83408 commit ea4fe68

1 file changed

Lines changed: 0 additions & 14 deletions

File tree

src/scripting_api/app_utils.js

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,6 @@ function serializeError(error) {
3131
const makeArr = () => [];
3232
const makeMap = () => new Map();
3333

34-
if (typeof PDFJSDev === "undefined" || !PDFJSDev.test("MOZCENTRAL")) {
35-
// TODO: Remove this once `Map.prototype.getOrInsertComputed` is supported in
36-
// QuickJS.
37-
if (typeof Map.prototype.getOrInsertComputed !== "function") {
38-
// eslint-disable-next-line no-extend-native
39-
Map.prototype.getOrInsertComputed = function (key, callbackFn) {
40-
if (!this.has(key)) {
41-
this.set(key, callbackFn(key));
42-
}
43-
return this.get(key);
44-
};
45-
}
46-
}
47-
4834
export {
4935
FORMS_VERSION,
5036
makeArr,

0 commit comments

Comments
 (0)