Skip to content

Commit

Permalink
For #11961: collect telemetry on all unique unsupported features that…
Browse files Browse the repository at this point in the history
… trigger fallback error.

This expands upon the telemetry we are collecting that shows the fallback error.
  • Loading branch information
emalysz committed Jun 8, 2020
1 parent a4fa455 commit 6eb41c9
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions web/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -869,6 +869,20 @@ const PDFViewerApplication = {
typeof PDFJSDev === "undefined" ||
PDFJSDev.test("MOZCENTRAL || GENERIC")
) {
if (featureId) {
this.externalServices.reportTelemetry({
type: "unsupportedFeature",
featureId,
});
} else {
for (const unsupportedFeature of this._delayedFallbackFeatureIds) {
this.externalServices.reportTelemetry({
type: "unsupportedFeature",
featureId: unsupportedFeature,
});
}
}

// For PDFs that contain script and form errors, we should only trigger
// the fallback once the user has interacted with the page.
if (this._delayedFallbackFeatureIds.length >= 1 && this._hasInteracted) {
Expand Down

0 comments on commit 6eb41c9

Please sign in to comment.