mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 17:30:09 +02:00
Merge pull request #16305 from Snuffleupagus/PDFJSDev-skip-PRODUCTION
Remove the `PRODUCTION` build-target
This commit is contained in:
commit
c9359957e6
31 changed files with 89 additions and 269 deletions
|
@ -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."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue