From 25a07d92d0b3127aa8b47cce776a4382341a1551 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Thu, 22 Jun 2023 15:02:54 +0200 Subject: [PATCH] [Firefox] Stub out the `isValidFetchUrl` function in MOZCENTRAL builds This helper function is completely unused in the Firefox PDF Viewer. --- src/display/display_utils.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/display/display_utils.js b/src/display/display_utils.js index 2ff4860f2..fe51836ff 100644 --- a/src/display/display_utils.js +++ b/src/display/display_utils.js @@ -697,6 +697,9 @@ class StatTimer { } function isValidFetchUrl(url, baseUrl) { + if (typeof PDFJSDev !== "undefined" && PDFJSDev.test("MOZCENTRAL")) { + throw new Error("Not implemented: isValidFetchUrl"); + } try { const { protocol } = baseUrl ? new URL(url, baseUrl) : new URL(url); // The Fetch API only supports the http/https protocols, and not file/ftp.