[Firefox] Stub out the isValidFetchUrl function in MOZCENTRAL builds

This helper function is completely unused in the Firefox PDF Viewer.
This commit is contained in:
Jonas Jenwald 2023-06-22 15:02:54 +02:00
parent 03059e1f86
commit 25a07d92d0

View File

@ -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.