Merge pull request #16305 from Snuffleupagus/PDFJSDev-skip-PRODUCTION

Remove the `PRODUCTION` build-target
This commit is contained in:
Tim van der Meij 2023-04-22 14:53:30 +02:00 committed by GitHub
commit c9359957e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
31 changed files with 89 additions and 269 deletions

View file

@ -705,10 +705,7 @@ const EMPTY_FINGERPRINT =
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00";
function find(stream, signature, limit = 1024, backwards = false) {
if (
typeof PDFJSDev === "undefined" ||
PDFJSDev.test("!PRODUCTION || TESTING")
) {
if (typeof PDFJSDev === "undefined" || PDFJSDev.test("TESTING")) {
assert(limit > 0, 'The "limit" must be a positive integer.');
}
const signatureLength = signature.length;
@ -762,10 +759,7 @@ function find(stream, signature, limit = 1024, backwards = false) {
*/
class PDFDocument {
constructor(pdfManager, stream) {
if (
typeof PDFJSDev === "undefined" ||
PDFJSDev.test("!PRODUCTION || TESTING")
) {
if (typeof PDFJSDev === "undefined" || PDFJSDev.test("TESTING")) {
assert(
stream instanceof BaseStream,
'PDFDocument: Invalid "stream" argument.'
@ -1426,10 +1420,7 @@ class PDFDocument {
async _getLinearizationPage(pageIndex) {
const { catalog, linearization, xref } = this;
if (
typeof PDFJSDev === "undefined" ||
PDFJSDev.test("!PRODUCTION || TESTING")
) {
if (typeof PDFJSDev === "undefined" || PDFJSDev.test("TESTING")) {
assert(
linearization && linearization.pageFirst === pageIndex,
"_getLinearizationPage - invalid pageIndex argument."