Loading
Bug 1910312 - Unbreak privacy and security settings when MOZ_DATA_REPORTING is disabled a=RyanVM
Disabling `MOZ_DATA_REPORTING` results in the `PREF_UPLOAD_ENABLED` pref not being loaded with `Preferences.add`. This means `Preferences.get(PREF_UPLOAD_ENABLED)` can possibly be `null`, which was previously not handled and resulted in an error for the whole privacy.js file. So only call `dataCollectionCheckboxHandler` for the `privateAttribution` checkbox if `MOZ_DATA_REPORTING` is enabled (otherwise the `privateAttribution` checkbox also just doesn't exist). Also move the call into separate `initPrivateAttributionCheckbox` function to be more consistent with previous code. Original Revision: https://phabricator.services.mozilla.com/D218265 Differential Revision: https://phabricator.services.mozilla.com/D219597