Skip to content

Commit

Permalink
Merge pull request #246 from IBMa/zhennan-1871
Browse files Browse the repository at this point in the history
A11y checker is crashing on Chrome and FF with multiple exceptions
  • Loading branch information
zhenwan authored Oct 5, 2020
2 parents fe56419 + 2752c25 commit 9bdd4e4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion accessibility-checker-extension/src/ts/background/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ BackgroundMessaging.addListener("DAP_SCAN_TAB_COMPLETE", async (message: any) =>
BackgroundMessaging.sendToPanel("DAP_SCAN_COMPLETE", message);
if (message.archiveId && message.policyId) {
let browser = (navigator.userAgent.match(/\) ([^)]*)$/) || ["", "Unknown"])[1];
metrics.profileV2(message.report.totalTime, browser, message.policyId);
let totalTime = (message.report != undefined)? message.report.totalTime: message.totalTime;
metrics.profileV2(totalTime, browser, message.policyId);
metrics.sendLogsV2();
}
} catch (err) {
Expand Down
6 changes: 5 additions & 1 deletion accessibility-checker-extension/src/ts/util/tabMessaging.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

import CommonMessaging from "./commonMessaging";
import BrowserDetection from "../util/browserDetection";
//import { report } from 'process';

export default class TabMessaging {

Expand All @@ -33,8 +34,11 @@ export default class TabMessaging {
var blob = new Blob([json_string], { type: "application/json" });

var url = URL.createObjectURL(blob);
delete myMessage.report;

myMessage.blob_url = url;
myMessage.totalTime = myMessage.report.totalTime;

delete myMessage.report;
}

return new Promise((resolve, reject) => {
Expand Down

0 comments on commit 9bdd4e4

Please sign in to comment.