1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-22 16:18:08 +02:00

Avoid to call a function in the js sandbox when it has been destroyed

This commit is contained in:
Calixte Denizet 2024-06-18 22:30:21 +02:00
parent 0d8828f93d
commit 4bdbf4bb3d

View file

@ -62,6 +62,9 @@ export class SandboxSupportBase {
* @param {Array<Object>} args - Arguments of the function.
*/
callSandboxFunction(name, args) {
if (!this.commFun) {
return;
}
try {
args = this.exportValueToSandbox(args);
this.commFun(name, args);