Skip to content

Commit 4ac7b88

Browse files
committed
Bug 1828679 - Set the preference signon.signupDetection.enabled to true to enable SignUpFormRuleset for all channels r=credential-management-reviewers,dimi
Differential Revision: https://phabricator.services.mozilla.com/D178659
1 parent f55b9c0 commit 4ac7b88

File tree

2 files changed

+13
-18
lines changed

2 files changed

+13
-18
lines changed

modules/libpref/init/all.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3184,11 +3184,7 @@ pref("signon.firefoxRelay.manage_url", "https://relay.firefox.com");
31843184
pref("signon.firefoxRelay.terms_of_service_url", "https://www.mozilla.org/%LOCALE%/about/legal/terms/subscription-services/");
31853185
pref("signon.firefoxRelay.privacy_policy_url", "https://www.mozilla.org/%LOCALE%/privacy/subscription-services/");
31863186
pref("signon.signupDetection.confidenceThreshold", "0.75");
3187-
#ifdef NIGHTLY_BUILD
3188-
pref("signon.signupDetection.enabled", true);
3189-
#else
3190-
pref("signon.signupDetection.enabled", false);
3191-
#endif
3187+
pref("signon.signupDetection.enabled", true);
31923188

31933189
// Satchel (Form Manager) prefs
31943190
pref("browser.formfill.debug", false);

toolkit/components/passwordmgr/LoginManagerChild.sys.mjs

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -596,21 +596,20 @@ export class LoginFormState {
596596
}
597597
const threshold = lazy.LoginHelper.signupDetectionConfidenceThreshold;
598598
let score = this.#cachedSignUpFormScore.get(formElement);
599-
if (score) {
600-
return score >= threshold;
601-
}
602-
TelemetryStopwatch.start("PWMGR_SIGNUP_FORM_DETECTION_MS");
603-
try {
604-
const { rules, type } = lazy.SignUpFormRuleset;
605-
const results = rules.against(formElement);
606-
score = results.get(formElement).scoreFor(type);
607-
TelemetryStopwatch.finish("PWMGR_SIGNUP_FORM_DETECTION_MS");
608-
} finally {
609-
if (TelemetryStopwatch.running("PWMGR_SIGNUP_FORM_DETECTION_MS")) {
610-
TelemetryStopwatch.cancel("PWMGR_SIGNUP_FORM_DETECTION_MS");
599+
if (!score) {
600+
TelemetryStopwatch.start("PWMGR_SIGNUP_FORM_DETECTION_MS");
601+
try {
602+
const { rules, type } = lazy.SignUpFormRuleset;
603+
const results = rules.against(formElement);
604+
score = results.get(formElement).scoreFor(type);
605+
TelemetryStopwatch.finish("PWMGR_SIGNUP_FORM_DETECTION_MS");
606+
} finally {
607+
if (TelemetryStopwatch.running("PWMGR_SIGNUP_FORM_DETECTION_MS")) {
608+
TelemetryStopwatch.cancel("PWMGR_SIGNUP_FORM_DETECTION_MS");
609+
}
611610
}
611+
this.#cachedSignUpFormScore.set(formElement, score);
612612
}
613-
this.#cachedSignUpFormScore.set(formElement, score);
614613
return score > threshold;
615614
}
616615

0 commit comments

Comments
 (0)