mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 02:05:37 +02:00
Properly cancel streams and guard at getTextContent.
This commit is contained in:
parent
0c95bc7d83
commit
a1dfbec532
3 changed files with 28 additions and 7 deletions
|
@ -13,7 +13,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { createPromiseCapability, Util } from '../shared/util';
|
||||
import { AbortException, createPromiseCapability, Util } from '../shared/util';
|
||||
import { CustomStyle, getDefaultSetting } from './dom_utils';
|
||||
|
||||
/**
|
||||
|
@ -498,7 +498,7 @@ var renderTextLayer = (function renderTextLayerClosure() {
|
|||
|
||||
cancel: function TextLayer_cancel() {
|
||||
if (this._reader) {
|
||||
this._reader.cancel();
|
||||
this._reader.cancel(new AbortException('text layer task cancelled'));
|
||||
this._reader = null;
|
||||
}
|
||||
this._canceled = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue