diff --git a/src/display/api.js b/src/display/api.js index 26b1793e5..0f2fdf01a 100644 --- a/src/display/api.js +++ b/src/display/api.js @@ -2260,14 +2260,8 @@ var InternalRenderTask = (function InternalRenderTaskClosure() { if (this._canvas) { canvasInRendering.delete(this._canvas); } - - if ((typeof PDFJSDev !== 'undefined' && PDFJSDev.test('PDFJS_NEXT')) || - getDefaultSetting('pdfjsNext')) { - this.callback(new RenderingCancelledException( - 'Rendering cancelled, page ' + this.pageNumber, 'canvas')); - } else { - this.callback('cancelled'); - } + this.callback(new RenderingCancelledException( + 'Rendering cancelled, page ' + this.pageNumber, 'canvas')); }, operatorListChanged: function InternalRenderTask_operatorListChanged() { diff --git a/web/pdf_page_view.js b/web/pdf_page_view.js index d236746c8..97ff9e84f 100644 --- a/web/pdf_page_view.js +++ b/web/pdf_page_view.js @@ -407,9 +407,7 @@ class PDFPageView { this.paintTask = null; } - if (((typeof PDFJSDev === 'undefined' || - !PDFJSDev.test('PDFJS_NEXT')) && error === 'cancelled') || - error instanceof RenderingCancelledException) { + if (error instanceof RenderingCancelledException) { this.error = null; return Promise.resolve(undefined); } @@ -589,13 +587,8 @@ class PDFPageView { let cancelled = false; let ensureNotCancelled = () => { if (cancelled) { - if ((typeof PDFJSDev !== 'undefined' && - PDFJSDev.test('PDFJS_NEXT')) || PDFJS.pdfjsNext) { - throw new RenderingCancelledException( - 'Rendering cancelled, page ' + this.id, 'svg'); - } else { - throw 'cancelled'; // eslint-disable-line no-throw-literal - } + throw new RenderingCancelledException( + 'Rendering cancelled, page ' + this.id, 'svg'); } }; diff --git a/web/pdf_thumbnail_view.js b/web/pdf_thumbnail_view.js index 1c0c3a42f..4b995313f 100644 --- a/web/pdf_thumbnail_view.js +++ b/web/pdf_thumbnail_view.js @@ -303,9 +303,7 @@ class PDFThumbnailView { this.renderTask = null; } - if (((typeof PDFJSDev === 'undefined' || - !PDFJSDev.test('PDFJS_NEXT')) && error === 'cancelled') || - error instanceof RenderingCancelledException) { + if (error instanceof RenderingCancelledException) { renderCapability.resolve(undefined); return; }