Bug 1689119 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

Currently, we do not cancel the [telemetry stopwatch if we throw any errors in LoginCSVImport.jsm.]((https://searchfox.org/mozilla-central/rev/9399e5832979755cd340383f4ca4069dd5fc7774/toolkit/components/passwordmgr/LoginCSVImport.jsm#135)) This seems like incorrect behavior and will cause the `browser_openImportCSV.js` test to fail when running the test in `--verify` mode.

The following are the errors that appear when running `browser_openImportCSV.js` in `--verify` mode:

```
browser/components/aboutlogins/tests/browser/browser_openImportCSV.js
  FAIL [JavaScript Error: "Error: TelemetryStopwatch: key "FX_MIGRATION_LOGINS_IMPORT_MS" was already initialized" {file: "resource://gre/modules/LoginCSVImport.jsm" line: 136}]
importFromCSV@resource://gre/modules/LoginCSVImport.jsm:136:24
```
```
resource://specialpowers/SpecialPowersChild.jsm:observe/<:158
  FAIL [JavaScript Error: "Error: TelemetryStopwatch: finishing nonexisting stopwatch. Histogram: "FX_MIGRATION_LOGINS_IMPORT_MS", key: "login_csv"" {file: "resource://gre/modules/LoginCSVImport.jsm" line: 222}]
importFromCSV@resource://gre/modules/LoginCSVImport.jsm:222:26
```
Currently, we do not cancel the [telemetry stopwatch if we throw any errors in LoginCSVImport.jsm.](https://searchfox.org/mozilla-central/rev/9399e5832979755cd340383f4ca4069dd5fc7774/toolkit/components/passwordmgr/LoginCSVImport.jsm#135) This seems like incorrect behavior and will cause the `browser_openImportCSV.js` test to fail when running the test in `--verify` mode.

The following are the errors that appear when running `browser_openImportCSV.js` in `--verify` mode:

```
browser/components/aboutlogins/tests/browser/browser_openImportCSV.js
  FAIL [JavaScript Error: "Error: TelemetryStopwatch: key "FX_MIGRATION_LOGINS_IMPORT_MS" was already initialized" {file: "resource://gre/modules/LoginCSVImport.jsm" line: 136}]
importFromCSV@resource://gre/modules/LoginCSVImport.jsm:136:24
```
```
resource://specialpowers/SpecialPowersChild.jsm:observe/<:158
  FAIL [JavaScript Error: "Error: TelemetryStopwatch: finishing nonexisting stopwatch. Histogram: "FX_MIGRATION_LOGINS_IMPORT_MS", key: "login_csv"" {file: "resource://gre/modules/LoginCSVImport.jsm" line: 222}]
importFromCSV@resource://gre/modules/LoginCSVImport.jsm:222:26
```

Back to Bug 1689119 Comment 0