Merge pull request #17014 from Snuffleupagus/reporttelemetry-tweaks

Don't bother trying to unregister the "reporttelemetry" event listener
This commit is contained in:
Jonas Jenwald 2023-09-22 17:35:55 +02:00 committed by GitHub
commit a68845c902
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2007,6 +2007,8 @@ const PDFViewerApplication = {
eventBus._on("openfile", webViewerOpenFile);
}
if (typeof PDFJSDev !== "undefined" && PDFJSDev.test("MOZCENTRAL")) {
// The `unbindEvents` method is unused in MOZCENTRAL builds,
// hence we don't need to unregister these event listeners.
eventBus._on(
"annotationeditorstateschanged",
webViewerAnnotationEditorStatesChanged
@ -2140,9 +2142,6 @@ const PDFViewerApplication = {
eventBus._off("fileinputchange", webViewerFileInputChange);
eventBus._off("openfile", webViewerOpenFile);
}
if (typeof PDFJSDev !== "undefined" && PDFJSDev.test("MOZCENTRAL")) {
eventBus._off("reporttelemetry", webViewerReportTelemetry);
}
_boundEvents.beforePrint = null;
_boundEvents.afterPrint = null;