Bug 1233369 - UnifiedComplete.js calls TelemetryStopwatch.finish() for PLACES_AUTOCOMPLETE_1ST_RESULT_TIME_MS multiple times. r=adw
--- a/toolkit/components/places/UnifiedComplete.js
+++ b/toolkit/components/places/UnifiedComplete.js
@@ -1324,17 +1324,19 @@ Search.prototype = {
// It's possible we don't have a favicon for this - and that's ok.
};
this._addMatch(match);
return true;
},
_onResultRow: function (row) {
- TelemetryStopwatch.finish(TELEMETRY_1ST_RESULT, this);
+ if (this._localMatchesCount == 0) {
+ TelemetryStopwatch.finish(TELEMETRY_1ST_RESULT, this);
+ }
let queryType = row.getResultByIndex(QUERYINDEX_QUERYTYPE);
let match;
switch (queryType) {
case QUERYTYPE_AUTOFILL_HOST:
this._result.setDefaultIndex(0);
match = this._processHostRow(row);
break;
case QUERYTYPE_AUTOFILL_URL: