Issue #21 - Remove use counters telemetry

This reverts Bug 968923 - Implement some equivalent of Chrome's use counters (on top of telemetry?)

For reference: https://bugzilla.mozilla.org/show_bug.cgi?id=968923
This commit is contained in:
FranklinDM 2022-04-04 22:54:59 +08:00 • committed by roytam1
commit 8ca9db6b65
45 changed files with 36 additions and 1128 deletions

View file

@ -24,7 +24,6 @@
#include "nsTHashtable.h" // for member
#include "mozilla/net/ReferrerPolicy.h" // for member
#include "nsWeakReference.h"
#include "mozilla/UseCounter.h"
#include "mozilla/WeakPtr.h"
#include "Units.h"
#include "nsContentListDeclarations.h"
@ -2782,23 +2781,6 @@ public:
bool DidFireDOMContentLoaded() const { return mDidFireDOMContentLoaded; }
void SetDocumentUseCounter(mozilla::UseCounter aUseCounter)
{
if (!mUseCounters[aUseCounter]) {
mUseCounters[aUseCounter] = true;
}
}
void SetPageUseCounter(mozilla::UseCounter aUseCounter);
void SetDocumentAndPageUseCounter(mozilla::UseCounter aUseCounter)
{
SetDocumentUseCounter(aUseCounter);
SetPageUseCounter(aUseCounter);
}
void PropagateUseCounters(nsIDocument* aParentDocument);
void SetUserHasInteracted(bool aUserHasInteracted)
{
mUserHasInteracted = aUserHasInteracted;
@ -2857,24 +2839,6 @@ public:
virtual void ScheduleResizeObserversNotification() const = 0;
protected:
bool GetUseCounter(mozilla::UseCounter aUseCounter)
{
return mUseCounters[aUseCounter];
}
void SetChildDocumentUseCounter(mozilla::UseCounter aUseCounter)
{
if (!mChildDocumentUseCounters[aUseCounter]) {
mChildDocumentUseCounters[aUseCounter] = true;
}
}
bool GetChildDocumentUseCounter(mozilla::UseCounter aUseCounter)
{
return mChildDocumentUseCounters[aUseCounter];
}
private:
mutable std::bitset<eDeprecatedOperationCount> mDeprecationWarnedAbout;
mutable std::bitset<eDocumentWarningCount> mDocWarningWarnedAbout;
@ -3315,15 +3279,7 @@ protected:
// Our live MediaQueryLists
PRCList mDOMMediaQueryLists;
// Flags for use counters used directly by this document.
std::bitset<mozilla::eUseCounter_Count> mUseCounters;
// Flags for use counters used by any child documents of this document.
std::bitset<mozilla::eUseCounter_Count> mChildDocumentUseCounters;
// Flags for whether we've notified our top-level "page" of a use counter
// for this child document.
std::bitset<mozilla::eUseCounter_Count> mNotifiedPageForUseCounter;
// Whether the user has interacted with the document or not:
// Whether the user has interacted with the document or not:
bool mUserHasInteracted;
mozilla::TimeStamp mPageUnloadingEventTimeStamp;