mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 17:30:09 +02:00
Send UnsupportedFeature
notification when errors are ignored in FontFaceObject.getPathGenerator
This commit is contained in:
parent
bf0db0fb72
commit
0958006713
2 changed files with 19 additions and 10 deletions
|
@ -1885,6 +1885,7 @@ var WorkerTransport = (function WorkerTransportClosure() {
|
|||
isEvalSupported: params.isEvalSupported,
|
||||
disableFontFace: params.disableFontFace,
|
||||
ignoreErrors: params.ignoreErrors,
|
||||
onUnsupportedFeature: this._onUnsupportedFeature.bind(this),
|
||||
fontRegistry,
|
||||
});
|
||||
var fontReady = (fontObjs) => {
|
||||
|
@ -1987,15 +1988,7 @@ var WorkerTransport = (function WorkerTransportClosure() {
|
|||
}
|
||||
}, this);
|
||||
|
||||
messageHandler.on('UnsupportedFeature', function(data) {
|
||||
if (this.destroyed) {
|
||||
return; // Ignore any pending requests if the worker was terminated.
|
||||
}
|
||||
let loadingTask = this.loadingTask;
|
||||
if (loadingTask.onUnsupportedFeature) {
|
||||
loadingTask.onUnsupportedFeature(data.featureId);
|
||||
}
|
||||
}, this);
|
||||
messageHandler.on('UnsupportedFeature', this._onUnsupportedFeature, this);
|
||||
|
||||
messageHandler.on('JpegDecode', function(data) {
|
||||
if (this.destroyed) {
|
||||
|
@ -2061,6 +2054,16 @@ var WorkerTransport = (function WorkerTransportClosure() {
|
|||
}, this);
|
||||
},
|
||||
|
||||
_onUnsupportedFeature({ featureId, }) {
|
||||
if (this.destroyed) {
|
||||
return; // Ignore any pending requests if the worker was terminated.
|
||||
}
|
||||
let loadingTask = this.loadingTask;
|
||||
if (loadingTask.onUnsupportedFeature) {
|
||||
loadingTask.onUnsupportedFeature(featureId);
|
||||
}
|
||||
},
|
||||
|
||||
getData: function WorkerTransport_getData() {
|
||||
return this.messageHandler.sendWithPromise('GetData', null);
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue