Merge pull request #11308 from Snuffleupagus/abortOperatorList-assert

Prevent browser exceptions from incorrectly triggering the `assert` in `PDFPageProxy._abortOperatorList` (PR 11069 follow-up)
This commit is contained in:
Tim van der Meij 2019-11-07 23:35:42 +01:00 committed by GitHub
commit 668650d564
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1378,7 +1378,8 @@ class PDFPageProxy {
* @private
*/
_abortOperatorList({ intentState, reason, force = false, }) {
assert(reason instanceof Error,
assert(reason instanceof Error ||
(typeof reason === 'object' && reason !== null),
'PDFPageProxy._abortOperatorList: Expected "reason" argument.');
if (!intentState.streamReader) {