mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 10:15:37 +02:00
Merge pull request #10873 from Snuffleupagus/worker-terminate-clearPrimitiveCaches
Ensure that the `Cmd`/`Name`/`Ref` caches are cleared when terminating the worker (PR 10863 follow-up)
This commit is contained in:
commit
209e42043a
1 changed files with 2 additions and 1 deletions
|
@ -19,10 +19,10 @@ import {
|
||||||
PasswordException, setVerbosityLevel, UnexpectedResponseException,
|
PasswordException, setVerbosityLevel, UnexpectedResponseException,
|
||||||
UnknownErrorException, UNSUPPORTED_FEATURES, VerbosityLevel, warn
|
UnknownErrorException, UNSUPPORTED_FEATURES, VerbosityLevel, warn
|
||||||
} from '../shared/util';
|
} from '../shared/util';
|
||||||
|
import { clearPrimitiveCaches, Ref } from './primitives';
|
||||||
import { LocalPdfManager, NetworkPdfManager } from './pdf_manager';
|
import { LocalPdfManager, NetworkPdfManager } from './pdf_manager';
|
||||||
import isNodeJS from '../shared/is_node';
|
import isNodeJS from '../shared/is_node';
|
||||||
import { MessageHandler } from '../shared/message_handler';
|
import { MessageHandler } from '../shared/message_handler';
|
||||||
import { Ref } from './primitives';
|
|
||||||
import { XRefParseException } from './core_utils';
|
import { XRefParseException } from './core_utils';
|
||||||
|
|
||||||
var WorkerTask = (function WorkerTaskClosure() {
|
var WorkerTask = (function WorkerTaskClosure() {
|
||||||
|
@ -700,6 +700,7 @@ var WorkerMessageHandler = {
|
||||||
if (cancelXHRs) {
|
if (cancelXHRs) {
|
||||||
cancelXHRs();
|
cancelXHRs();
|
||||||
}
|
}
|
||||||
|
clearPrimitiveCaches();
|
||||||
|
|
||||||
var waitOn = [];
|
var waitOn = [];
|
||||||
WorkerTasks.forEach(function (task) {
|
WorkerTasks.forEach(function (task) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue