Closed Bug 1400147 Opened 8 years ago Closed 8 years ago

[Form Autofill] Disable credit card heuristics when credit card availability is set to false

Categories

(Toolkit :: Form Manager, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla58
Tracking Status
firefox57 --- fixed
firefox58 --- fixed

People

(Reporter: scottwu, Assigned: selee)

References

Details

(Whiteboard: [form autofill:MVP])

Attachments

(1 file)

When `extensions.formautofill.creditCards.available` is set to `false`, we should skip running heuristics for credit card related fields, thus improve performance.
Priority: -- → P3
Assignee: nobody → selee
Status: NEW → ASSIGNED
Comment on attachment 8910069 [details] Bug 1400147 - Ignore the credit card regexps when extensions.formautofill.creditCards.available is false. https://reviewboard.mozilla.org/r/181546/#review186938 ::: browser/extensions/formautofill/FormAutofillHeuristics.jsm:490 (Diff revision 1) > + } else { > + if (!this._regexpListOf_CcUnavailable_AcOn) { > + this._regexpListOf_CcUnavailable_AcOn = regexps.filter(name => !FormAutofillUtils.isCreditCardField(name)); > + } > + regexps = this._regexpListOf_CcUnavailable_AcOn; > + } How about add an "early return" here when `regexps` is empty?
Attachment #8910069 - Flags: review?(lchang) → review+
(In reply to Luke Chang [:lchang] from comment #2) > How about add an "early return" here when `regexps` is empty? Fix this in the latest patch.
Keywords: checkin-needed
Pushed by lchang@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6918dea06b7b Ignore the credit card regexps when extensions.formautofill.creditCards.available is false. r=lchang
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: mozilla57 → ---
The patch is updated with the pref "extensions.formautofill.creditCards.available". Please help to land this patch again. Thanks.
Keywords: checkin-needed
Pushed by ryanvm@gmail.com: https://hg.mozilla.org/integration/autoland/rev/7ac393189541 Ignore the credit card regexps when extensions.formautofill.creditCards.available is false. r=lchang
Keywords: checkin-needed
Status: REOPENED → RESOLVED
Closed: 8 years ago8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
Blocks: 1399382
Comment on attachment 8910069 [details] Bug 1400147 - Ignore the credit card regexps when extensions.formautofill.creditCards.available is false. Approval Request Comment [Feature/Bug causing the regression]: Feature [User impact if declined]: Credit Card feature is in a unnecessary code path, and this can have some performance impact. [Is this code covered by automated tests?]: Yes. [Has the fix been verified in Nightly?]: Yes. [Needs manual test from QE? If yes, steps to reproduce]: No. [List of other uplifts needed for the feature/fix]: No. [Is the change risky?]: No, this patch just adds a if-condition to ignore some regexps in available=false case. [Why is the change risky/not risky?]: [String changes made/needed]: No.
Attachment #8910069 - Flags: approval-mozilla-beta?
Comment on attachment 8910069 [details] Bug 1400147 - Ignore the credit card regexps when extensions.formautofill.creditCards.available is false. Makes sense, taking it. Should be in 57b5
Attachment #8910069 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
(In reply to Sean Lee [:seanlee][:weilonge] from comment #12) > [Is this code covered by automated tests?]: Yes. > [Has the fix been verified in Nightly?]: Yes. > [Needs manual test from QE? If yes, steps to reproduce]: No. Setting qe-verify- based on Sean's assessment on manual testing needs and the fact that this fix has automated coverage.
Flags: qe-verify-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: