IV. Clear Data Dialog Cleanup
Cleanup patch removing dead code after the new dialog shipped.
Bug 1856418 | D271909 | Reviewer: manuel
The Change
The old clear history dialog (sanitize.xhtml) and the preference privacy.sanitize.useOldClearHistoryDialog have been fully removed. The new dialog (sanitize_v2.xhtml) is now the only option.
Removed
UI Files:
sanitize.xhtmlclearSiteData.xhtmlsanitize.jsclearSiteData.js
Tests:
browser_sanitizeDialog.jstest_Sanitizer_interrupted.js- Other old dialog test files
Preferences:
privacy.sanitize.useOldClearHistoryDialogfromStaticPrefList.yamlandfirefox.js
Updated
sanitizeDialog.jsandSanitizer.sys.mjs— removed conditional branchesprivacy.js— removed old dialog selection logicCacheObserver.h— removed C++ preference check- Test files — removed old dialog preference settings
- Test manifests — removed old test entries
jar.mn— removed old dialog files from packaging
What I Learned
- Cleanup patches require thoroughness — Every reference must be found: prefs, tests, localization, conditionals
- Always run lint before committing —
./mach lint --warnings --outgoingcatches accidental file inclusions - Legacy code accumulates — Every feature flag eventually becomes tech debt; regular cleanup keeps the codebase maintainable
Comments
Loading comments...