[api-minor] Disable eval support by default

The idea behind this patch is to see if disabling of `eval` leads to any reports about bad performance, since the previous patch should have improved things a fair bit.
This commit is contained in:
Jonas Jenwald 2025-02-06 09:09:29 +01:00
parent f7ec74c474
commit 602824ba0f
2 changed files with 3 additions and 3 deletions

View File

@ -159,7 +159,7 @@ const RENDERING_CANCELLED_TIMEOUT = 100; // ms
* Use -1 for no limit, which is also the default value.
* @property {boolean} [isEvalSupported] - Determines if we can evaluate strings
* as JavaScript. Primarily used to improve performance of PDF functions.
* The default value is `true`.
* The default value is `false`.
* @property {boolean} [isOffscreenCanvasSupported] - Determines if we can use
* `OffscreenCanvas` in the worker. Primarily used to improve performance of
* image conversion/rendering.
@ -289,7 +289,7 @@ function getDocument(src = {}) {
Number.isInteger(src.maxImageSize) && src.maxImageSize > -1
? src.maxImageSize
: -1;
const isEvalSupported = src.isEvalSupported !== false;
const isEvalSupported = src.isEvalSupported === true;
const isOffscreenCanvasSupported =
typeof src.isOffscreenCanvasSupported === "boolean"
? src.isOffscreenCanvasSupported

View File

@ -419,7 +419,7 @@ const defaultOptions = {
},
isEvalSupported: {
/** @type {boolean} */
value: true,
value: false,
kind: OptionKind.API,
},
isOffscreenCanvasSupported: {