summaryrefslogtreecommitdiff
path: root/dom/base
diff options
context:
space:
mode:
authoradeshkp <adeshkp@users.noreply.github.com>2019-01-12 06:20:31 -0500
committeradeshkp <adeshkp@users.noreply.github.com>2019-01-12 06:20:31 -0500
commit5335681cd2ab05ad47e81be7722c9eee19d54065 (patch)
treeeced0f22032c4f01229ac0a18b9ffb6219cea309 /dom/base
parentf38edc94a31de3bae839cf63ed57c3851908ac46 (diff)
downloaduxp-5335681cd2ab05ad47e81be7722c9eee19d54065.tar.gz
Telemetry: Remove stubs and related code
Diffstat (limited to 'dom/base')
-rw-r--r--dom/base/nsDOMWindowUtils.cpp2
-rw-r--r--dom/base/nsDocument.cpp74
-rw-r--r--dom/base/nsDocument.h10
-rw-r--r--dom/base/nsFrameMessageManager.cpp6
-rw-r--r--dom/base/nsGlobalWindow.cpp11
-rw-r--r--dom/base/nsGlobalWindow.h5
-rw-r--r--dom/base/nsObjectLoadingContent.cpp1
7 files changed, 0 insertions, 109 deletions
diff --git a/dom/base/nsDOMWindowUtils.cpp b/dom/base/nsDOMWindowUtils.cpp
index 291df5f271..2ab5937ace 100644
--- a/dom/base/nsDOMWindowUtils.cpp
+++ b/dom/base/nsDOMWindowUtils.cpp
@@ -4033,8 +4033,6 @@ nsDOMWindowUtils::ForceUseCounterFlush(nsIDOMNode *aNode)
if (nsCOMPtr<nsIDocument> doc = do_QueryInterface(aNode)) {
mozilla::css::ImageLoader* loader = doc->StyleImageLoader();
loader->FlushUseCounters();
-
- static_cast<nsDocument*>(doc.get())->ReportUseCounters();
return NS_OK;
}
diff --git a/dom/base/nsDocument.cpp b/dom/base/nsDocument.cpp
index e779c060c9..14de65cbdf 100644
--- a/dom/base/nsDocument.cpp
+++ b/dom/base/nsDocument.cpp
@@ -1395,63 +1395,6 @@ nsDocument::~nsDocument()
NS_ASSERTION(!mIsShowing, "Destroying a currently-showing document");
- if (IsTopLevelContentDocument()) {
- //don't report for about: pages
- if (!IsAboutPage()) {
- // Record the page load
- uint32_t pageLoaded = 1;
- Accumulate(Telemetry::MIXED_CONTENT_UNBLOCK_COUNTER, pageLoaded);
- // Record the mixed content status of the docshell in Telemetry
- enum {
- NO_MIXED_CONTENT = 0, // There is no Mixed Content on the page
- MIXED_DISPLAY_CONTENT = 1, // The page attempted to load Mixed Display Content
- MIXED_ACTIVE_CONTENT = 2, // The page attempted to load Mixed Active Content
- MIXED_DISPLAY_AND_ACTIVE_CONTENT = 3 // The page attempted to load Mixed Display & Mixed Active Content
- };
-
- bool mixedActiveLoaded = GetHasMixedActiveContentLoaded();
- bool mixedActiveBlocked = GetHasMixedActiveContentBlocked();
-
- bool mixedDisplayLoaded = GetHasMixedDisplayContentLoaded();
- bool mixedDisplayBlocked = GetHasMixedDisplayContentBlocked();
-
- bool hasMixedDisplay = (mixedDisplayBlocked || mixedDisplayLoaded);
- bool hasMixedActive = (mixedActiveBlocked || mixedActiveLoaded);
-
- uint32_t mixedContentLevel = NO_MIXED_CONTENT;
- if (hasMixedDisplay && hasMixedActive) {
- mixedContentLevel = MIXED_DISPLAY_AND_ACTIVE_CONTENT;
- } else if (hasMixedActive){
- mixedContentLevel = MIXED_ACTIVE_CONTENT;
- } else if (hasMixedDisplay) {
- mixedContentLevel = MIXED_DISPLAY_CONTENT;
- }
- Accumulate(Telemetry::MIXED_CONTENT_PAGE_LOAD, mixedContentLevel);
-
- // record mixed object subrequest telemetry
- if (mHasMixedContentObjectSubrequest) {
- /* mixed object subrequest loaded on page*/
- Accumulate(Telemetry::MIXED_CONTENT_OBJECT_SUBREQUEST, 1);
- } else {
- /* no mixed object subrequests loaded on page*/
- Accumulate(Telemetry::MIXED_CONTENT_OBJECT_SUBREQUEST, 0);
- }
-
- // record CSP telemetry on this document
- if (mHasCSP) {
- Accumulate(Telemetry::CSP_DOCUMENTS_COUNT, 1);
- }
- if (mHasUnsafeInlineCSP) {
- Accumulate(Telemetry::CSP_UNSAFE_INLINE_DOCUMENTS_COUNT, 1);
- }
- if (mHasUnsafeEvalCSP) {
- Accumulate(Telemetry::CSP_UNSAFE_EVAL_DOCUMENTS_COUNT, 1);
- }
- }
- }
-
- ReportUseCounters();
-
mInDestructor = true;
mInUnlinkOrDeletion = true;
@@ -12353,23 +12296,6 @@ nsIDocument::InlineScriptAllowedByCSP()
return allowsInlineScript;
}
-static bool
-MightBeAboutOrChromeScheme(nsIURI* aURI)
-{
- MOZ_ASSERT(aURI);
- bool isAbout = true;
- bool isChrome = true;
- aURI->SchemeIs("about", &isAbout);
- aURI->SchemeIs("chrome", &isChrome);
- return isAbout || isChrome;
-}
-
-void
-nsDocument::ReportUseCounters()
-{
-/* STUB */
-}
-
void
nsDocument::AddIntersectionObserver(DOMIntersectionObserver* aObserver)
{
diff --git a/dom/base/nsDocument.h b/dom/base/nsDocument.h
index d2f97a33e5..95fd57545b 100644
--- a/dom/base/nsDocument.h
+++ b/dom/base/nsDocument.h
@@ -774,8 +774,6 @@ public:
virtual nsViewportInfo GetViewportInfo(const mozilla::ScreenIntSize& aDisplaySize) override;
- void ReportUseCounters();
-
virtual void AddIntersectionObserver(
mozilla::dom::DOMIntersectionObserver* aObserver) override;
virtual void RemoveIntersectionObserver(
@@ -1449,14 +1447,6 @@ public:
// 'style-sheet-applicable-state-changed' notification.
bool mSSApplicableStateNotificationPending:1;
- // Whether we have reported use counters for this document with Telemetry yet.
- // Normally this is only done at document destruction time, but for image
- // documents (SVG documents) that are not guaranteed to be destroyed, we
- // report use counters when the image cache no longer has any imgRequestProxys
- // pointing to them. We track whether we ever reported use counters so
- // that we only report them once for the document.
- bool mReportedUseCounters:1;
-
// Whether we have filled our pres shell's style set with the document's
// additional sheets and sheets from the nsStyleSheetService.
bool mStyleSetFilled:1;
diff --git a/dom/base/nsFrameMessageManager.cpp b/dom/base/nsFrameMessageManager.cpp
index f173678b74..f4c4ca0f16 100644
--- a/dom/base/nsFrameMessageManager.cpp
+++ b/dom/base/nsFrameMessageManager.cpp
@@ -706,12 +706,6 @@ nsFrameMessageManager::SendRpcMessage(const nsAString& aMessageName,
static bool
AllowMessage(size_t aDataLength, const nsAString& aMessageName)
{
- static const size_t kMinTelemetryMessageSize = 8192;
-
- if (aDataLength < kMinTelemetryMessageSize) {
- return true;
- }
-
NS_ConvertUTF16toUTF8 messageName(aMessageName);
messageName.StripChars("0123456789");
diff --git a/dom/base/nsGlobalWindow.cpp b/dom/base/nsGlobalWindow.cpp
index 677e1a0ea4..de2ebdefe6 100644
--- a/dom/base/nsGlobalWindow.cpp
+++ b/dom/base/nsGlobalWindow.cpp
@@ -288,7 +288,6 @@ static bool gMouseDown = false;
static bool gDragServiceDisabled = false;
static FILE *gDumpFile = nullptr;
static uint32_t gSerialCounter = 0;
-static TimeStamp gLastRecordedRecentTimeouts;
#define STATISTICS_INTERVAL (30 * PR_MSEC_PER_SEC)
#ifdef DEBUG_jst
@@ -1518,7 +1517,6 @@ nsGlobalWindow::nsGlobalWindow(nsGlobalWindow *aOuterWindow)
mIsPopupSpam(false),
mBlockScriptedClosingFlag(false),
mWasOffline(false),
- mHasHadSlowScript(false),
mNotifyIdleObserversIdleOnThaw(false),
mNotifyIdleObserversActiveOnThaw(false),
mCreatingInnerWindow(false),
@@ -11542,8 +11540,6 @@ nsGlobalWindow::ShowSlowScriptDialog()
unsigned lineno;
bool hasFrame = JS::DescribeScriptedCaller(cx, &filename, &lineno);
- mHasHadSlowScript = true;
-
if (XRE_IsContentProcess() &&
ProcessHangMonitor::Get()) {
ProcessHangMonitor::SlowScriptAction action;
@@ -13399,13 +13395,6 @@ nsGlobalWindow::RunTimeout(Timeout* aTimeout)
return;
}
- // Record telemetry information about timers set recently.
- TimeDuration recordingInterval = TimeDuration::FromMilliseconds(STATISTICS_INTERVAL);
- if (gLastRecordedRecentTimeouts.IsNull() ||
- now - gLastRecordedRecentTimeouts > recordingInterval) {
- gLastRecordedRecentTimeouts = now;
- }
-
// Insert a dummy timeout into the list of timeouts between the
// portion of the list that we are about to process now and those
// timeouts that will be processed in a future call to
diff --git a/dom/base/nsGlobalWindow.h b/dom/base/nsGlobalWindow.h
index 1cb825a773..1f420895c8 100644
--- a/dom/base/nsGlobalWindow.h
+++ b/dom/base/nsGlobalWindow.h
@@ -1780,11 +1780,6 @@ protected:
// Window offline status. Checked to see if we need to fire offline event
bool mWasOffline : 1;
- // Represents whether the inner window's page has had a slow script notice.
- // Only used by inner windows; will always be false for outer windows.
- // This is used to implement Telemetry measures such as SLOW_SCRIPT_PAGE_COUNT.
- bool mHasHadSlowScript : 1;
-
// Track what sorts of events we need to fire when thawed
bool mNotifyIdleObserversIdleOnThaw : 1;
bool mNotifyIdleObserversActiveOnThaw : 1;
diff --git a/dom/base/nsObjectLoadingContent.cpp b/dom/base/nsObjectLoadingContent.cpp
index 709c7aa56c..c1b7322582 100644
--- a/dom/base/nsObjectLoadingContent.cpp
+++ b/dom/base/nsObjectLoadingContent.cpp
@@ -1582,7 +1582,6 @@ nsObjectLoadingContent::MaybeRewriteYoutubeEmbed(nsIURI* aURI, nsIURI* aBaseURI,
}
}
- // If we're pref'd off, return after telemetry has been logged.
if (!Preferences::GetBool(kPrefYoutubeRewrite)) {
return;
}