forked from mirrors/gecko-dev
Bug 1898384: Collect LCP under the same conditions as we collect other pageload telemetry. r=sefeng
Differential Revision: https://phabricator.services.mozilla.com/D211302
This commit is contained in:
parent
b3ec710094
commit
0e9f98bc02
2 changed files with 3 additions and 2 deletions
|
|
@ -16202,7 +16202,8 @@ void Document::ReportDocumentUseCounters() {
|
|||
void Document::ReportLCP() {
|
||||
const nsDOMNavigationTiming* timing = GetNavigationTiming();
|
||||
|
||||
if (!timing) {
|
||||
if (!ShouldIncludeInTelemetry() || !IsTopLevelContentDocument() || !timing ||
|
||||
!timing->DocShellHasBeenActiveSinceNavigationStart()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -210,7 +210,7 @@ class nsDOMNavigationTiming final : public mozilla::RelativeTimeline {
|
|||
return timing.forget();
|
||||
}
|
||||
|
||||
bool DocShellHasBeenActiveSinceNavigationStart() {
|
||||
bool DocShellHasBeenActiveSinceNavigationStart() const {
|
||||
return mDocShellHasBeenActiveSinceNavigationStart;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue