The reason we introduce aSkipChromePrincipalCheck to nsRFPService::IsRFPEnabledFor function is because of ChromeUtils.shouldResistFingerprint function. ChromeUtils uses system principal, causing IsJSContextCurrentlyChromePrivileged() to return true no matter what the document is. In case of ChromeUtils.shouldResistFingerprint we are not interested in JS context's principal, we are only interested in the document.
Differential Revision: https://phabricator.services.mozilla.com/D234215