зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1753517 - Remove unneeded logging. r=sgalich,dimi
Differential Revision: https://phabricator.services.mozilla.com/D138044
This commit is contained in:
Родитель
0d0788b018
Коммит
fe24b21452
|
@ -181,8 +181,6 @@ AutofillProfileAutoCompleteSearch.prototype = {
|
|||
} = FormAutofillContent;
|
||||
this.forceStop = false;
|
||||
|
||||
this.debug("startSearch: for", searchString, "with input", activeInput);
|
||||
|
||||
let isAddressField = FormAutofillUtils.isAddressField(
|
||||
activeFieldDetail.fieldName
|
||||
);
|
||||
|
@ -327,7 +325,6 @@ AutofillProfileAutoCompleteSearch.prototype = {
|
|||
* Promise that resolves when addresses returned from parent process.
|
||||
*/
|
||||
_getRecords(input, data) {
|
||||
this.debug("_getRecords with data:", data);
|
||||
if (!input) {
|
||||
return [];
|
||||
}
|
||||
|
@ -701,8 +698,7 @@ var FormAutofillContent = {
|
|||
this.debug("updateActiveElement: skipping check; autofill is imminent");
|
||||
} else if (element.value?.length !== 0) {
|
||||
this.debug(
|
||||
"updateActiveElement: Not opening popup because field is " +
|
||||
`not empty: element.value = "${element.value}"`
|
||||
`updateActiveElement: Not opening popup because field is not empty.`
|
||||
);
|
||||
} else {
|
||||
this.debug(
|
||||
|
@ -786,8 +782,7 @@ var FormAutofillContent = {
|
|||
|
||||
identifyAutofillFields(element) {
|
||||
this.debug(
|
||||
"identifyAutofillFields:",
|
||||
String(element.ownerDocument.location)
|
||||
`identifyAutofillFields: ${element.ownerDocument.location?.hostname}`
|
||||
);
|
||||
|
||||
if (DELEGATE_AUTOCOMPLETE || !this.savedFieldNames) {
|
||||
|
@ -812,7 +807,6 @@ var FormAutofillContent = {
|
|||
let validDetails = formHandler.collectFormFields();
|
||||
|
||||
this._formsDetails.set(formHandler.form.rootElement, formHandler);
|
||||
this.debug("Adding form handler to _formsDetails:", formHandler);
|
||||
|
||||
validDetails.forEach(detail =>
|
||||
this._markAsAutofillField(detail.elementWeakRef.get())
|
||||
|
|
|
@ -307,11 +307,6 @@ class FormAutofillSection {
|
|||
profile[key] = profile[key] % Math.pow(10, maxLength);
|
||||
break;
|
||||
default:
|
||||
log.warn(
|
||||
"adaptFieldMaxLength: Don't know how to truncate",
|
||||
typeof profile[key],
|
||||
profile[key]
|
||||
);
|
||||
}
|
||||
} else {
|
||||
delete profile[key];
|
||||
|
@ -342,10 +337,9 @@ class FormAutofillSection {
|
|||
}
|
||||
|
||||
if (!(await this.prepareFillingProfile(profile))) {
|
||||
log.debug("profile cannot be filled", profile);
|
||||
log.debug("profile cannot be filled");
|
||||
return false;
|
||||
}
|
||||
log.debug("profile in autofillFields:", profile);
|
||||
|
||||
let focusedInput = focusedDetail.elementWeakRef.get();
|
||||
|
||||
|
@ -424,8 +418,6 @@ class FormAutofillSection {
|
|||
* A profile to be previewed with
|
||||
*/
|
||||
previewFormFields(profile) {
|
||||
log.debug("preview profile: ", profile);
|
||||
|
||||
this.preparePreviewProfile(profile);
|
||||
|
||||
for (let fieldDetail of this.fieldDetails) {
|
||||
|
@ -465,7 +457,7 @@ class FormAutofillSection {
|
|||
* Clear preview text and background highlight of all fields.
|
||||
*/
|
||||
clearPreviewedFormFields() {
|
||||
log.debug("clear previewed fields in:", this.form);
|
||||
log.debug("clear previewed fields");
|
||||
|
||||
for (let fieldDetail of this.fieldDetails) {
|
||||
let element = fieldDetail.elementWeakRef.get();
|
||||
|
@ -1611,7 +1603,7 @@ class FormAutofillHandler {
|
|||
throw new Error("Unknown section type");
|
||||
}
|
||||
}
|
||||
log.debug("Create records:", records);
|
||||
|
||||
return records;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -352,8 +352,6 @@ class AutofillRecords {
|
|||
* The GUID of the newly added item..
|
||||
*/
|
||||
async add(record, { sourceSync = false } = {}) {
|
||||
this.log.debug("add:", record);
|
||||
|
||||
let recordToSave = this._clone(record);
|
||||
|
||||
if (sourceSync) {
|
||||
|
@ -460,7 +458,7 @@ class AutofillRecords {
|
|||
* Preserve old record's properties if they don't exist in new record.
|
||||
*/
|
||||
async update(guid, record, preserveOldProperties = false) {
|
||||
this.log.debug("update:", guid, record);
|
||||
this.log.debug(`update: ${guid}`);
|
||||
|
||||
let recordFoundIndex = this._findIndexByGUID(guid);
|
||||
if (recordFoundIndex == -1) {
|
||||
|
@ -633,7 +631,7 @@ class AutofillRecords {
|
|||
* A clone of the record.
|
||||
*/
|
||||
async get(guid, { rawData = false } = {}) {
|
||||
this.log.debug("get:", guid, rawData);
|
||||
this.log.debug(`get: ${guid}`);
|
||||
|
||||
let recordFound = this._findByGUID(guid);
|
||||
if (!recordFound) {
|
||||
|
@ -661,7 +659,7 @@ class AutofillRecords {
|
|||
* An array containing clones of all records.
|
||||
*/
|
||||
async getAll({ rawData = false, includeDeleted = false } = {}) {
|
||||
this.log.debug("getAll", rawData, includeDeleted);
|
||||
this.log.debug(`getAll. includeDeleted = ${includeDeleted}`);
|
||||
|
||||
let records = this._data.filter(r => !r.deleted || includeDeleted);
|
||||
// Records are cloned to avoid accidental modifications from outside.
|
||||
|
|
|
@ -40,8 +40,6 @@ class ProfileAutoCompleteResult {
|
|||
matchingProfiles,
|
||||
{ resultCode = null, isSecure = true, isInputAutofilled = false }
|
||||
) {
|
||||
log.debug("Constructing new ProfileAutoCompleteResult:", [...arguments]);
|
||||
|
||||
// nsISupports
|
||||
this.QueryInterface = ChromeUtils.generateQI(["nsIAutoCompleteResult"]);
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ class Addresses extends AddressesBase {
|
|||
* Return true if address is merged into target with specific guid or false if not.
|
||||
*/
|
||||
async mergeIfPossible(guid, address, strict) {
|
||||
this.log.debug("mergeIfPossible:", guid, address);
|
||||
this.log.debug(`mergeIfPossible: ${guid}`);
|
||||
|
||||
let addressFound = this._findByGUID(guid);
|
||||
if (!addressFound) {
|
||||
|
@ -190,7 +190,7 @@ class CreditCards extends CreditCardsBase {
|
|||
* Return true if credit card is merged into target with specific guid or false if not.
|
||||
*/
|
||||
async mergeIfPossible(guid, creditCard) {
|
||||
this.log.debug("mergeIfPossible:", guid, creditCard);
|
||||
this.log.debug(`mergeIfPossible: ${guid}`);
|
||||
|
||||
// Credit card number is required since it also must match.
|
||||
if (!creditCard["cc-number"]) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче