1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-19 22:58:07 +02:00

Merge pull request #18286 from calixteman/call_sandbox

Avoid to call a function in the js sandbox when it has been destroyed
This commit is contained in:
calixteman 2024-06-18 22:53:16 +02:00 committed by GitHub
commit 9dbe4c246b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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);