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

RESOLVED FIXED in Firefox 57

Status

()

Toolkit
Form Manager
P3
normal
RESOLVED FIXED
3 months ago
2 months ago

People

(Reporter: scottwu, Assigned: seanlee)

Tracking

unspecified
mozilla58
Points:
---
Bug Flags:
qe-verify -

Firefox Tracking Flags

(firefox57 fixed, firefox58 fixed)

Details

(Whiteboard: [form autofill:MVP])

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment)

(Reporter)

Description

3 months ago
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)

Updated

3 months ago
Assignee: nobody → selee
Status: NEW → ASSIGNED
Comment hidden (mozreview-request)

Comment 2

3 months ago
mozreview-review
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+
Comment hidden (mozreview-request)
(Assignee)

Comment 4

3 months ago
(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

Comment 5

3 months ago
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

Comment 6

3 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/6918dea06b7b
Status: ASSIGNED → RESOLVED
Last Resolved: 3 months ago
status-firefox57: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
Backed out for heuristics xpcshell failures on Beta.
https://hg.mozilla.org/integration/mozilla-inbound/rev/540d10078b32f3f2426dc208df2fd710bb5c7ca1

https://treeherder.mozilla.org/logviewer.html#?job_id=132355777&repo=mozilla-beta
Status: RESOLVED → REOPENED
status-firefox57: fixed → affected
Resolution: FIXED → ---
Target Milestone: mozilla57 → ---
Comment hidden (mozreview-request)
(Assignee)

Comment 9

3 months ago
The patch is updated with the pref "extensions.formautofill.creditCards.available". Please help to land this patch again. Thanks.
Keywords: checkin-needed

Comment 10

3 months ago
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

Comment 11

3 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/7ac393189541
Status: REOPENED → RESOLVED
Last Resolved: 3 months ago3 months ago
status-firefox58: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
Blocks: 1399382
(Assignee)

Comment 12

3 months ago
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+

Comment 14

2 months ago
bugherderuplift
https://hg.mozilla.org/releases/mozilla-beta/rev/dd4bcf227b95
status-firefox57: affected → fixed
(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.