Bug 1556453 - report origin telemetry only on top-level docs; r=Ehsan,johannh

Differential Revision: https://phabricator.services.mozilla.com/D34548

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Liang-Heng Chen 2019-06-13 08:07:48 +00:00
parent 2e0a3f0ddb
commit 4412aa9260

View File

@ -10313,7 +10313,8 @@ void Document::Destroy() {
if (mIsGoingAway) return;
// Make sure to report before IPC closed.
if (!nsContentUtils::IsInPrivateBrowsing(this)) {
if (!nsContentUtils::IsInPrivateBrowsing(this) &&
IsTopLevelContentDocument()) {
mContentBlockingLog.ReportLog(NodePrincipal());
mContentBlockingLog.ReportOrigins();
}