diff options
author | Matt A. Tobin <email@mattatobin.com> | 2022-04-27 16:01:54 -0500 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2022-04-27 16:01:54 -0500 |
commit | 7cf07296a23e71bbb4277c4f6c6b1da00cd6bf4c (patch) | |
tree | 2dc1a4dceda223d07bba6015bd8d5a2093666ad1 /dom/base/nsDocument.cpp | |
parent | 2af0aa91e0ed0e6a8e3f0759e43272a92ebfd22e (diff) | |
download | aura-central-7cf07296a23e71bbb4277c4f6c6b1da00cd6bf4c.tar.gz |
[DOM/Layout/System:Image] Remove use counters telemetry
Diffstat (limited to 'dom/base/nsDocument.cpp')
-rw-r--r-- | dom/base/nsDocument.cpp | 77 |
1 files changed, 0 insertions, 77 deletions
diff --git a/dom/base/nsDocument.cpp b/dom/base/nsDocument.cpp index 08c78c88d..34bba04a3 100644 --- a/dom/base/nsDocument.cpp +++ b/dom/base/nsDocument.cpp @@ -9662,19 +9662,6 @@ static const char* kDocumentWarnings[] = { }; #undef DOCUMENT_WARNING -static UseCounter -OperationToUseCounter(nsIDocument::DeprecatedOperations aOperation) -{ - switch(aOperation) { -#define DEPRECATED_OPERATION(_op) \ - case nsIDocument::e##_op: return eUseCounter_##_op; -#include "nsDeprecatedOperationList.h" -#undef DEPRECATED_OPERATION - default: - MOZ_CRASH(); - } -} - bool nsIDocument::HasWarnedAbout(DeprecatedOperations aOperation) const { @@ -9690,7 +9677,6 @@ nsIDocument::WarnOnceAbout(DeprecatedOperations aOperation, return; } mDeprecationWarnedAbout[aOperation] = true; - const_cast<nsIDocument*>(this)->SetDocumentAndPageUseCounter(OperationToUseCounter(aOperation)); uint32_t flags = asError ? nsIScriptError::errorFlag : nsIScriptError::warningFlag; nsContentUtils::ReportToConsole(flags, @@ -11941,69 +11927,6 @@ nsIDocument::GetTopLevelContentDocument() return parent; } -void -nsIDocument::PropagateUseCounters(nsIDocument* aParentDocument) -{ - MOZ_ASSERT(this != aParentDocument); - - // What really matters here is that our use counters get propagated as - // high up in the content document hierarchy as possible. So, - // starting with aParentDocument, we need to find the toplevel content - // document, and propagate our use counters into its - // mChildDocumentUseCounters. - nsIDocument* contentParent = aParentDocument->GetTopLevelContentDocument(); - - if (!contentParent) { - return; - } - - contentParent->mChildDocumentUseCounters |= mUseCounters; - contentParent->mChildDocumentUseCounters |= mChildDocumentUseCounters; -} - -void -nsIDocument::SetPageUseCounter(UseCounter aUseCounter) -{ - // We want to set the use counter on the "page" that owns us; the definition - // of "page" depends on what kind of document we are. See the comments below - // for details. In any event, checking all the conditions below is - // reasonably expensive, so we cache whether we've notified our owning page. - if (mNotifiedPageForUseCounter[aUseCounter]) { - return; - } - mNotifiedPageForUseCounter[aUseCounter] = true; - - if (mDisplayDocument) { - // If we are a resource document, we won't have a docshell and so we won't - // record any page use counters on this document. Instead, we should - // forward it up to the document that loaded us. - MOZ_ASSERT(!mDocumentContainer); - mDisplayDocument->SetChildDocumentUseCounter(aUseCounter); - return; - } - - if (IsBeingUsedAsImage()) { - // If this is an SVG image document, we also won't have a docshell. - MOZ_ASSERT(!mDocumentContainer); - return; - } - - // We only care about use counters in content. If we're already a toplevel - // content document, then we should have already set the use counter on - // ourselves, and we are done. - nsIDocument* contentParent = GetTopLevelContentDocument(); - if (!contentParent) { - return; - } - - if (this == contentParent) { - MOZ_ASSERT(GetUseCounter(aUseCounter)); - return; - } - - contentParent->SetChildDocumentUseCounter(aUseCounter); -} - bool nsIDocument::HasScriptsBlockedBySandbox() { |