diff options
author | Moonchild <moonchild@palemoon.org> | 2021-10-29 11:02:27 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2021-10-29 11:02:27 +0000 |
commit | cba6b06fc8bce52117abec9b3f3fc41475df69c2 (patch) | |
tree | 6d84ca82ac6c4b413ee7460f28d13eb2fb20f691 /dom | |
parent | 378c086ef4e05803e04be104e2cb488734c57715 (diff) | |
download | aura-central-cba6b06fc8bce52117abec9b3f3fc41475df69c2.tar.gz |
Issue %3029 - Part 1: Remove Telemetry plumbing and fix build.
Note this won't give working applications. Requires FE changes and additional
js module changes (next part).
Diffstat (limited to 'dom')
33 files changed, 8 insertions, 265 deletions
diff --git a/dom/base/BodyUtil.cpp b/dom/base/BodyUtil.cpp index 2bce8a0bf..c9b447ac9 100644 --- a/dom/base/BodyUtil.cpp +++ b/dom/base/BodyUtil.cpp @@ -129,9 +129,6 @@ private: * * File blobs are copies of the underlying data string since we cannot adopt * char* chunks embedded within the larger body without significant effort. - * FIXME(nsm): Bug 1127552 - We should add telemetry to calls to formData() and - * friends to figure out if Fetch ends up copying big blobs to see if this is - * worth optimizing. */ class MOZ_STACK_CLASS FormDataParser { diff --git a/dom/base/DocGroup.cpp b/dom/base/DocGroup.cpp index 5d7db1fb6..a0e1ee7ec 100644 --- a/dom/base/DocGroup.cpp +++ b/dom/base/DocGroup.cpp @@ -4,7 +4,6 @@ #include "mozilla/dom/DocGroup.h" #include "mozilla/dom/TabGroup.h" -#include "mozilla/Telemetry.h" #include "nsIURI.h" #include "nsIEffectiveTLDService.h" #include "mozilla/StaticPtr.h" diff --git a/dom/base/Element.cpp b/dom/base/Element.cpp index 2784c1701..73784d047 100644 --- a/dom/base/Element.cpp +++ b/dom/base/Element.cpp @@ -123,7 +123,6 @@ #include "nsWrapperCacheInlines.h" #include "xpcpublic.h" #include "nsIScriptError.h" -#include "mozilla/Telemetry.h" #include "mozilla/CORSMode.h" #include "mozilla/dom/ShadowRoot.h" diff --git a/dom/base/FragmentOrElement.cpp b/dom/base/FragmentOrElement.cpp index e70236ea0..69122a2f4 100644 --- a/dom/base/FragmentOrElement.cpp +++ b/dom/base/FragmentOrElement.cpp @@ -113,7 +113,6 @@ #include "nsCycleCollector.h" #include "xpcpublic.h" #include "nsIScriptError.h" -#include "mozilla/Telemetry.h" #include "mozilla/CORSMode.h" diff --git a/dom/base/Navigator.cpp b/dom/base/Navigator.cpp index 4fd740564..5ad763af7 100644 --- a/dom/base/Navigator.cpp +++ b/dom/base/Navigator.cpp @@ -28,7 +28,6 @@ #include "nsContentUtils.h" #include "nsUnicharUtils.h" #include "mozilla/Preferences.h" -#include "mozilla/Telemetry.h" #ifdef MOZ_GAMEPAD #include "mozilla/dom/GamepadServiceTest.h" #endif @@ -1616,9 +1615,7 @@ Navigator::RequestMediaKeySystemAccess(const nsAString& aKeySystem, nsCOMPtr<nsIGlobalObject> go = do_QueryInterface(mWindow); RefPtr<DetailedPromise> promise = DetailedPromise::Create(go, aRv, - NS_LITERAL_CSTRING("navigator.requestMediaKeySystemAccess"), - Telemetry::VIDEO_EME_REQUEST_SUCCESS_LATENCY_MS, - Telemetry::VIDEO_EME_REQUEST_FAILURE_LATENCY_MS); + NS_LITERAL_CSTRING("navigator.requestMediaKeySystemAccess")); if (aRv.Failed()) { return nullptr; } diff --git a/dom/base/TabGroup.cpp b/dom/base/TabGroup.cpp index 14e3a0993..60f429f49 100644 --- a/dom/base/TabGroup.cpp +++ b/dom/base/TabGroup.cpp @@ -8,7 +8,6 @@ #include "mozilla/dom/DocGroup.h" #include "mozilla/ClearOnShutdown.h" #include "mozilla/StaticPtr.h" -#include "mozilla/Telemetry.h" #include "mozilla/ThrottledEventQueue.h" #include "nsIDocShell.h" #include "nsIEffectiveTLDService.h" diff --git a/dom/base/nsINode.cpp b/dom/base/nsINode.cpp index d5949fe94..db8986c4e 100644 --- a/dom/base/nsINode.cpp +++ b/dom/base/nsINode.cpp @@ -20,7 +20,6 @@ #include "mozilla/Likely.h" #include "mozilla/MemoryReporting.h" #include "mozilla/ServoBindings.h" -#include "mozilla/Telemetry.h" #include "mozilla/TimeStamp.h" #include "mozilla/css/StyleRule.h" #include "mozilla/dom/Element.h" diff --git a/dom/base/nsJSEnvironment.cpp b/dom/base/nsJSEnvironment.cpp index 3b2a1cb19..15448181f 100644 --- a/dom/base/nsJSEnvironment.cpp +++ b/dom/base/nsJSEnvironment.cpp @@ -56,7 +56,6 @@ #include "mozilla/dom/ScriptSettings.h" #include "nsAXPCNativeCallContext.h" #include "mozilla/CycleCollectedJSContext.h" -#include "mozilla/Telemetry.h" #include "nsJSPrincipals.h" @@ -2007,7 +2006,7 @@ DOMGCSliceCallback(JSContext* aCx, JS::GCProgress aProgress, const JS::GCDescrip } if (!sShuttingDown) { - if (sPostGCEventsToObserver || Telemetry::CanRecordExtended()) { + if (sPostGCEventsToObserver) { nsString json; json.Adopt(aDesc.formatJSON(aCx, PR_Now())); RefPtr<NotifyGCEndRunnable> notify = new NotifyGCEndRunnable(json); diff --git a/dom/base/nsNodeInfoManager.cpp b/dom/base/nsNodeInfoManager.cpp index a092fbb3c..986700024 100644 --- a/dom/base/nsNodeInfoManager.cpp +++ b/dom/base/nsNodeInfoManager.cpp @@ -10,7 +10,6 @@ #include "nsNodeInfoManager.h" #include "mozilla/DebugOnly.h" -#include "mozilla/Telemetry.h" #include "mozilla/dom/NodeInfo.h" #include "mozilla/dom/NodeInfoInlines.h" #include "nsCOMPtr.h" diff --git a/dom/base/nsRange.cpp b/dom/base/nsRange.cpp index 1d1a8f26d..150bf7d62 100644 --- a/dom/base/nsRange.cpp +++ b/dom/base/nsRange.cpp @@ -32,7 +32,6 @@ #include "mozilla/dom/DOMStringList.h" #include "mozilla/dom/ShadowRoot.h" #include "mozilla/dom/Selection.h" -#include "mozilla/Telemetry.h" #include "mozilla/Likely.h" #include "nsCSSFrameConstructor.h" #include "nsStyleStruct.h" diff --git a/dom/base/test/browser_use_counters.js b/dom/base/test/browser_use_counters.js index 68bd04f88..7206bb506 100644 --- a/dom/base/test/browser_use_counters.js +++ b/dom/base/test/browser_use_counters.js @@ -7,30 +7,6 @@ Cu.import("resource://gre/modules/Services.jsm"); const gHttpTestRoot = "http://example.com/browser/dom/base/test/"; -/** - * Enable local telemetry recording for the duration of the tests. - */ -var gOldContentCanRecord = false; -var gOldParentCanRecord = false; -add_task(function* test_initialize() { - let Telemetry = Cc["@mozilla.org/base/telemetry;1"].getService(Ci.nsITelemetry); - gOldParentCanRecord = Telemetry.canRecordExtended - Telemetry.canRecordExtended = true; - - // Because canRecordExtended is a per-process variable, we need to make sure - // that all of the pages load in the same content process. Limit the number - // of content processes to at most 1 (or 0 if e10s is off entirely). - yield SpecialPowers.pushPrefEnv({ set: [[ "dom.ipc.processCount", 1 ]] }); - - gOldContentCanRecord = yield ContentTask.spawn(gBrowser.selectedBrowser, {}, function () { - let telemetry = Cc["@mozilla.org/base/telemetry;1"].getService(Ci.nsITelemetry); - let old = telemetry.canRecordExtended; - telemetry.canRecordExtended = true; - return old; - }); - info("canRecord for content: " + gOldContentCanRecord); -}); - add_task(function* () { // Check that use counters are incremented by SVGs loaded directly in iframes. yield check_use_counter_iframe("file_use_counter_svg_getElementById.svg", @@ -73,20 +49,6 @@ add_task(function* () { // "PROPERTY_FILL_OPACITY"); }); -add_task(function* () { - let Telemetry = Cc["@mozilla.org/base/telemetry;1"].getService(Ci.nsITelemetry); - Telemetry.canRecordExtended = gOldParentCanRecord; - - yield ContentTask.spawn(gBrowser.selectedBrowser, { oldCanRecord: gOldContentCanRecord }, function (arg) { - Cu.import("resource://gre/modules/PromiseUtils.jsm"); - yield new Promise(resolve => { - let telemetry = Cc["@mozilla.org/base/telemetry;1"].getService(Ci.nsITelemetry); - telemetry.canRecordExtended = arg.oldCanRecord; - resolve(); - }); - }); -}); - function waitForDestroyedDocuments() { let deferred = promise.defer(); @@ -108,17 +70,6 @@ function waitForPageLoad(browser) { } function grabHistogramsFromContent(use_counter_middlefix, page_before = null) { - let telemetry = Cc["@mozilla.org/base/telemetry;1"].getService(Ci.nsITelemetry); - let suffix = Services.appinfo.browserTabsRemoteAutostart ? "#content" : ""; - let gather = () => [ - telemetry.getHistogramById("USE_COUNTER2_" + use_counter_middlefix + "_PAGE" + suffix).snapshot().sum, - telemetry.getHistogramById("USE_COUNTER2_" + use_counter_middlefix + "_DOCUMENT" + suffix).snapshot().sum, - telemetry.getHistogramById("CONTENT_DOCUMENTS_DESTROYED" + suffix).snapshot().sum, - telemetry.getHistogramById("TOP_LEVEL_CONTENT_DOCUMENTS_DESTROYED" + suffix).snapshot().sum, - ]; - return BrowserTestUtils.waitForCondition(() => { - return page_before != telemetry.getHistogramById("USE_COUNTER2_" + use_counter_middlefix + "_PAGE" + suffix).snapshot().sum; - }).then(gather, gather); } var check_use_counter_iframe = Task.async(function* (file, use_counter_middlefix, check_documents=true) { @@ -128,12 +79,6 @@ var check_use_counter_iframe = Task.async(function* (file, use_counter_middlefix gBrowser.selectedTab = newTab; newTab.linkedBrowser.stop(); - // Hold on to the current values of the telemetry histograms we're - // interested in. - let [histogram_page_before, histogram_document_before, - histogram_docs_before, histogram_toplevel_docs_before] = - yield grabHistogramsFromContent(use_counter_middlefix); - gBrowser.selectedBrowser.loadURI(gHttpTestRoot + "file_use_counter_outer.html"); yield waitForPageLoad(gBrowser.selectedBrowser); @@ -151,7 +96,7 @@ var check_use_counter_iframe = Task.async(function* (file, use_counter_middlefix // We flush the main document first, then the iframe's document to // ensure any propagation that might happen from content->parent should - // have already happened when counters are reported to telemetry. + // have already happened. wu.forceUseCounterFlush(content.document); wu.forceUseCounterFlush(iframe.contentDocument); @@ -192,12 +137,6 @@ var check_use_counter_img = Task.async(function* (file, use_counter_middlefix) { gBrowser.selectedTab = newTab; newTab.linkedBrowser.stop(); - // Hold on to the current values of the telemetry histograms we're - // interested in. - let [histogram_page_before, histogram_document_before, - histogram_docs_before, histogram_toplevel_docs_before] = - yield grabHistogramsFromContent(use_counter_middlefix); - gBrowser.selectedBrowser.loadURI(gHttpTestRoot + "file_use_counter_outer.html"); yield waitForPageLoad(gBrowser.selectedBrowser); @@ -258,12 +197,6 @@ var check_use_counter_direct = Task.async(function* (file, use_counter_middlefix gBrowser.selectedTab = newTab; newTab.linkedBrowser.stop(); - // Hold on to the current values of the telemetry histograms we're - // interested in. - let [histogram_page_before, histogram_document_before, - histogram_docs_before, histogram_toplevel_docs_before] = - yield grabHistogramsFromContent(use_counter_middlefix); - gBrowser.selectedBrowser.loadURI(gHttpTestRoot + file); yield ContentTask.spawn(gBrowser.selectedBrowser, null, function*() { Cu.import("resource://gre/modules/PromiseUtils.jsm"); diff --git a/dom/canvas/CanvasRenderingContext2D.cpp b/dom/canvas/CanvasRenderingContext2D.cpp index 275aaf8d0..3965d40f8 100644 --- a/dom/canvas/CanvasRenderingContext2D.cpp +++ b/dom/canvas/CanvasRenderingContext2D.cpp @@ -95,7 +95,6 @@ #include "mozilla/layers/PersistentBufferProvider.h" #include "mozilla/MathAlgorithms.h" #include "mozilla/Preferences.h" -#include "mozilla/Telemetry.h" #include "mozilla/TimeStamp.h" #include "mozilla/UniquePtr.h" #include "mozilla/Unused.h" diff --git a/dom/canvas/OffscreenCanvas.cpp b/dom/canvas/OffscreenCanvas.cpp index 981faf1b1..dbe3df4ba 100644 --- a/dom/canvas/OffscreenCanvas.cpp +++ b/dom/canvas/OffscreenCanvas.cpp @@ -1,5 +1,4 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* vim:set ts=2 sw=2 sts=2 et cindent: */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ @@ -15,7 +14,6 @@ #include "mozilla/layers/AsyncCanvasRenderer.h" #include "mozilla/layers/CanvasClient.h" #include "mozilla/layers/ImageBridgeChild.h" -#include "mozilla/Telemetry.h" #include "CanvasRenderingContext2D.h" #include "CanvasUtils.h" #include "GLContext.h" diff --git a/dom/canvas/WebGL2Context.cpp b/dom/canvas/WebGL2Context.cpp index e88e22e86..09891e7b6 100644 --- a/dom/canvas/WebGL2Context.cpp +++ b/dom/canvas/WebGL2Context.cpp @@ -9,7 +9,6 @@ #include "GLContext.h" #include "mozilla/dom/WebGL2RenderingContextBinding.h" #include "mozilla/ArrayUtils.h" -#include "mozilla/Telemetry.h" #include "nsPrintfCString.h" #include "WebGLBuffer.h" #include "WebGLFormats.h" diff --git a/dom/canvas/WebGLContext.cpp b/dom/canvas/WebGLContext.cpp index ce3dfa4c3..30b609bc9 100644 --- a/dom/canvas/WebGLContext.cpp +++ b/dom/canvas/WebGLContext.cpp @@ -31,7 +31,6 @@ #include "mozilla/ProcessPriorityManager.h" #include "mozilla/ScopeExit.h" #include "mozilla/Services.h" -#include "mozilla/Telemetry.h" #include "nsContentUtils.h" #include "nsDisplayList.h" #include "nsError.h" diff --git a/dom/crypto/WebCryptoTask.cpp b/dom/crypto/WebCryptoTask.cpp index 122afd793..ad81b6d4c 100644 --- a/dom/crypto/WebCryptoTask.cpp +++ b/dom/crypto/WebCryptoTask.cpp @@ -11,7 +11,6 @@ #include "nsProxyRelease.h" #include "jsapi.h" -#include "mozilla/Telemetry.h" #include "mozilla/dom/CryptoBuffer.h" #include "mozilla/dom/CryptoKey.h" #include "mozilla/dom/KeyAlgorithmProxy.h" @@ -45,56 +44,6 @@ using mozilla::dom::workers::Status; using mozilla::dom::workers::WorkerHolder; using mozilla::dom::workers::WorkerPrivate; -// Pre-defined identifiers for telemetry histograms - -enum TelemetryMethod { - TM_ENCRYPT = 0, - TM_DECRYPT = 1, - TM_SIGN = 2, - TM_VERIFY = 3, - TM_DIGEST = 4, - TM_GENERATEKEY = 5, - TM_DERIVEKEY = 6, - TM_DERIVEBITS = 7, - TM_IMPORTKEY = 8, - TM_EXPORTKEY = 9, - TM_WRAPKEY = 10, - TM_UNWRAPKEY = 11 -}; - -enum TelemetryAlgorithm { - // Please make additions at the end of the list, - // to preserve comparability of histograms over time - TA_UNKNOWN = 0, - // encrypt / decrypt - TA_AES_CBC = 1, - TA_AES_CFB = 2, - TA_AES_CTR = 3, - TA_AES_GCM = 4, - TA_RSAES_PKCS1 = 5, // NB: This algorithm has been removed - TA_RSA_OAEP = 6, - // sign/verify - TA_RSASSA_PKCS1 = 7, - TA_RSA_PSS = 8, - TA_HMAC_SHA_1 = 9, - TA_HMAC_SHA_224 = 10, - TA_HMAC_SHA_256 = 11, - TA_HMAC_SHA_384 = 12, - TA_HMAC_SHA_512 = 13, - // digest - TA_SHA_1 = 14, - TA_SHA_224 = 15, - TA_SHA_256 = 16, - TA_SHA_384 = 17, - TA_SHA_512 = 18, - // Later additions - TA_AES_KW = 19, - TA_ECDH = 20, - TA_PBKDF2 = 21, - TA_ECDSA = 22, - TA_HKDF = 23, -}; - // Convenience functions for extracting / converting information // OOM-safe CryptoBuffer initialization, suitable for constructors @@ -577,12 +526,10 @@ public: } // Cache parameters depending on the specific algorithm - TelemetryAlgorithm telemetryAlg; if (algName.EqualsLiteral(WEBCRYPTO_ALG_AES_CBC)) { CHECK_KEY_ALGORITHM(aKey.Algorithm(), WEBCRYPTO_ALG_AES_CBC); mMechanism = CKM_AES_CBC_PAD; - telemetryAlg = TA_AES_CBC; RootedDictionary<AesCbcParams> params(aCx); nsresult rv = Coerce(aCx, params, aAlgorithm); if (NS_FAILED(rv)) { @@ -599,7 +546,6 @@ public: CHECK_KEY_ALGORITHM(aKey.Algorithm(), WEBCRYPTO_ALG_AES_CTR); mMechanism = CKM_AES_CTR; - telemetryAlg = TA_AES_CTR; RootedDictionary<AesCtrParams> params(aCx); nsresult rv = Coerce(aCx, params, aAlgorithm); if (NS_FAILED(rv)) { @@ -618,7 +564,6 @@ public: CHECK_KEY_ALGORITHM(aKey.Algorithm(), WEBCRYPTO_ALG_AES_GCM); mMechanism = CKM_AES_GCM; - telemetryAlg = TA_AES_GCM; RootedDictionary<AesGcmParams> params(aCx); nsresult rv = Coerce(aCx, params, aAlgorithm); if (NS_FAILED(rv)) { @@ -1033,16 +978,6 @@ public: mEarlyRv = NS_ERROR_DOM_DATA_ERR; return; } - - TelemetryAlgorithm telemetryAlg; - switch (mMechanism) { - case CKM_SHA_1_HMAC: telemetryAlg = TA_HMAC_SHA_1; break; - case CKM_SHA224_HMAC: telemetryAlg = TA_HMAC_SHA_224; break; - case CKM_SHA256_HMAC: telemetryAlg = TA_HMAC_SHA_256; break; - case CKM_SHA384_HMAC: telemetryAlg = TA_HMAC_SHA_384; break; - case CKM_SHA512_HMAC: telemetryAlg = TA_HMAC_SHA_512; break; - default: telemetryAlg = TA_UNKNOWN; - } } private: @@ -1333,15 +1268,11 @@ public: return; } - TelemetryAlgorithm telemetryAlg; - if (algName.EqualsLiteral(WEBCRYPTO_ALG_SHA1)) { - telemetryAlg = TA_SHA_1; - } else if (algName.EqualsLiteral(WEBCRYPTO_ALG_SHA256)) { - telemetryAlg = TA_SHA_224; - } else if (algName.EqualsLiteral(WEBCRYPTO_ALG_SHA384)) { - telemetryAlg = TA_SHA_256; - } else if (algName.EqualsLiteral(WEBCRYPTO_ALG_SHA512)) { - telemetryAlg = TA_SHA_384; + if (algName.EqualsLiteral(WEBCRYPTO_ALG_SHA1) || + algName.EqualsLiteral(WEBCRYPTO_ALG_SHA256) || + algName.EqualsLiteral(WEBCRYPTO_ALG_SHA384) || + algName.EqualsLiteral(WEBCRYPTO_ALG_SHA512)) { + // All good, fall through. } else { mEarlyRv = NS_ERROR_DOM_SYNTAX_ERR; return; diff --git a/dom/events/EventDispatcher.cpp b/dom/events/EventDispatcher.cpp index 28d4d8189..b708b03e9 100644 --- a/dom/events/EventDispatcher.cpp +++ b/dom/events/EventDispatcher.cpp @@ -53,7 +53,6 @@ #include "mozilla/ipc/MessageChannel.h" #include "mozilla/MiscEvents.h" #include "mozilla/MouseEvents.h" -#include "mozilla/Telemetry.h" #include "mozilla/TextEvents.h" #include "mozilla/TouchEvents.h" #include "mozilla/Unused.h" diff --git a/dom/html/HTMLCanvasElement.cpp b/dom/html/HTMLCanvasElement.cpp index 11d909373..21f1d3df2 100644 --- a/dom/html/HTMLCanvasElement.cpp +++ b/dom/html/HTMLCanvasElement.cpp @@ -25,7 +25,6 @@ #include "mozilla/layers/AsyncCanvasRenderer.h" #include "mozilla/MouseEvents.h" #include "mozilla/Preferences.h" -#include "mozilla/Telemetry.h" #include "nsAttrValueInlines.h" #include "nsContentUtils.h" #include "nsDisplayList.h" diff --git a/dom/media/CubebUtils.cpp b/dom/media/CubebUtils.cpp index f5f5cb3b1..a9315d8ab 100644 --- a/dom/media/CubebUtils.cpp +++ b/dom/media/CubebUtils.cpp @@ -1,5 +1,4 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* vim:set ts=2 sw=2 sts=2 et cindent: */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ @@ -14,7 +13,6 @@ #include "mozilla/Sprintf.h" #include "mozilla/StaticMutex.h" #include "mozilla/StaticPtr.h" -#include "mozilla/Telemetry.h" #include "mozilla/Logging.h" #include "nsThreadUtils.h" #include "CubebUtils.h" diff --git a/dom/media/MediaFormatReader.cpp b/dom/media/MediaFormatReader.cpp index 396f31e37..98ba57a6e 100644 --- a/dom/media/MediaFormatReader.cpp +++ b/dom/media/MediaFormatReader.cpp @@ -1,5 +1,4 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* vim:set ts=2 sw=2 sts=2 et cindent: */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ @@ -11,7 +10,6 @@ #include "mozilla/ClearOnShutdown.h" #include "mozilla/dom/HTMLMediaElement.h" #include "mozilla/Preferences.h" -#include "mozilla/Telemetry.h" #include "nsContentUtils.h" #include "nsPrintfCString.h" #include "nsSize.h" diff --git a/dom/media/gmp/GMPParent.cpp b/dom/media/gmp/GMPParent.cpp index 84603e973..e6f797264 100644 --- a/dom/media/gmp/GMPParent.cpp +++ b/dom/media/gmp/GMPParent.cpp @@ -24,8 +24,6 @@ using mozilla::ipc::GeckoChildProcessHost; -#include "mozilla/Telemetry.h" - #ifdef XP_WIN #include "WMFDecoderModule.h" #endif diff --git a/dom/media/platforms/wmf/WMFAudioMFTManager.cpp b/dom/media/platforms/wmf/WMFAudioMFTManager.cpp index cf1ebb1cf..ef83dbb05 100644 --- a/dom/media/platforms/wmf/WMFAudioMFTManager.cpp +++ b/dom/media/platforms/wmf/WMFAudioMFTManager.cpp @@ -1,5 +1,4 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* vim:set ts=2 sw=2 sts=2 et cindent: */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ @@ -10,7 +9,6 @@ #include "WMFUtils.h" #include "nsTArray.h" #include "TimeUnits.h" -#include "mozilla/Telemetry.h" #include "mozilla/Logging.h" #define LOG(...) MOZ_LOG(sPDMLog, mozilla::LogLevel::Debug, (__VA_ARGS__)) @@ -260,10 +258,6 @@ WMFAudioMFTManager::Output(int64_t aStreamOffset, if (!sample) { LOG("Audio MFTDecoder returned success but null output."); - nsCOMPtr<nsIRunnable> task = NS_NewRunnableFunction([]() -> void { - LOG("Reporting telemetry AUDIO_MFT_OUTPUT_NULL_SAMPLES"); - }); - AbstractThread::MainThread()->Dispatch(task.forget()); return E_FAIL; } diff --git a/dom/media/platforms/wmf/WMFVideoMFTManager.cpp b/dom/media/platforms/wmf/WMFVideoMFTManager.cpp index a7633a7de..c04f30128 100644 --- a/dom/media/platforms/wmf/WMFVideoMFTManager.cpp +++ b/dom/media/platforms/wmf/WMFVideoMFTManager.cpp @@ -1,5 +1,4 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* vim:set ts=2 sw=2 sts=2 et cindent: */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ @@ -25,7 +24,6 @@ #include "gfxWindowsPlatform.h" #include "IMFYCbCrImage.h" #include "mozilla/WindowsVersion.h" -#include "mozilla/Telemetry.h" #include "nsPrintfCString.h" #include "GMPUtils.h" // For SplitAt. TODO: Move SplitAt to a central place. #include "MP4Decoder.h" @@ -116,19 +114,6 @@ WMFVideoMFTManager::~WMFVideoMFTManager() if (mDXVA2Manager) { DeleteOnMainThread(mDXVA2Manager); } - - // Record whether the video decoder successfully decoded, or output null - // samples but did/didn't recover. - uint32_t telemetry = (mNullOutputCount == 0) ? 0 : - (mGotValidOutputAfterNullOutput && mGotExcessiveNullOutput) ? 1 : - mGotExcessiveNullOutput ? 2 : - mGotValidOutputAfterNullOutput ? 3 : - 4; - - nsCOMPtr<nsIRunnable> task = NS_NewRunnableFunction([=]() -> void { - LOG(nsPrintfCString("Reporting telemetry VIDEO_MFT_OUTPUT_NULL_SAMPLES=%d", telemetry).get()); - }); - AbstractThread::MainThread()->Dispatch(task.forget()); } const GUID& diff --git a/dom/plugins/base/nsPluginHost.cpp b/dom/plugins/base/nsPluginHost.cpp index 8a87f672e..b36bf9633 100644 --- a/dom/plugins/base/nsPluginHost.cpp +++ b/dom/plugins/base/nsPluginHost.cpp @@ -88,7 +88,6 @@ #include "nsIContentPolicy.h" #include "nsContentPolicyUtils.h" #include "mozilla/TimeStamp.h" -#include "mozilla/Telemetry.h" #include "nsIImageLoadingContent.h" #include "mozilla/Preferences.h" #include "nsVersionComparator.h" diff --git a/dom/plugins/ipc/PluginAsyncSurrogate.cpp b/dom/plugins/ipc/PluginAsyncSurrogate.cpp index 9e41cb561..355a50a98 100644 --- a/dom/plugins/ipc/PluginAsyncSurrogate.cpp +++ b/dom/plugins/ipc/PluginAsyncSurrogate.cpp @@ -11,7 +11,6 @@ #include "mozilla/plugins/PluginInstanceParent.h" #include "mozilla/plugins/PluginModuleParent.h" #include "mozilla/plugins/PluginScriptableObjectParent.h" -#include "mozilla/Telemetry.h" #include "nsJSNPRuntime.h" #include "nsNPAPIPlugin.h" #include "nsNPAPIPluginInstance.h" diff --git a/dom/plugins/ipc/PluginHangUIParent.cpp b/dom/plugins/ipc/PluginHangUIParent.cpp index abffc7b10..e4767b867 100644 --- a/dom/plugins/ipc/PluginHangUIParent.cpp +++ b/dom/plugins/ipc/PluginHangUIParent.cpp @@ -30,33 +30,6 @@ using mozilla::widget::WidgetUtils; using std::string; using std::vector; -namespace { -class nsPluginHangUITelemetry : public mozilla::Runnable -{ -public: - nsPluginHangUITelemetry(int aResponseCode, int aDontAskCode, - uint32_t aResponseTimeMs, uint32_t aTimeoutMs) - : mResponseCode(aResponseCode), - mDontAskCode(aDontAskCode), - mResponseTimeMs(aResponseTimeMs), - mTimeoutMs(aTimeoutMs) - { - } - - NS_IMETHOD - Run() override - { - return NS_OK; - } - -private: - int mResponseCode; - int mDontAskCode; - uint32_t mResponseTimeMs; - uint32_t mTimeoutMs; -}; -} // namespace - namespace mozilla { namespace plugins { @@ -358,11 +331,6 @@ PluginHangUIParent::RecvUserResponse(const unsigned int& aResponse) responseCode = 3; } int dontAskCode = (aResponse & HANGUI_USER_RESPONSE_DONT_SHOW_AGAIN) ? 1 : 0; - nsCOMPtr<nsIRunnable> workItem = new nsPluginHangUITelemetry(responseCode, - dontAskCode, - LastShowDurationMs(), - mTimeoutPrefMs); - NS_DispatchToMainThread(workItem); return true; } diff --git a/dom/plugins/ipc/PluginInstanceParent.cpp b/dom/plugins/ipc/PluginInstanceParent.cpp index 438ec4c27..005fbf98d 100644 --- a/dom/plugins/ipc/PluginInstanceParent.cpp +++ b/dom/plugins/ipc/PluginInstanceParent.cpp @@ -761,8 +761,6 @@ PluginInstanceParent::SetCurrentImage(Image* aImage) gfx::IntRect rect = aImage->GetPictureRect(); NPRect nprect = {uint16_t(rect.x), uint16_t(rect.y), uint16_t(rect.width), uint16_t(rect.height)}; RecvNPN_InvalidateRect(nprect); - - RecordDrawingModel(); } bool @@ -899,7 +897,6 @@ PluginInstanceParent::RecvShow(const NPRect& updatedRect, PLUGIN_LOG_DEBUG((" (RecvShow invalidated for surface %p)", mFrontSurface.get())); - RecordDrawingModel(); return true; } @@ -1265,7 +1262,6 @@ PluginInstanceParent::NPP_SetWindow(const NPWindow* aWindow) return NPERR_GENERIC_ERROR; } - RecordDrawingModel(); return NPERR_NO_ERROR; } @@ -2224,28 +2220,3 @@ PluginInstanceParent::RecvOnWindowedPluginKeyEvent( owner->OnWindowedPluginKeyEvent(aKeyEventData); return true; } - -void -PluginInstanceParent::RecordDrawingModel() -{ - int mode = -1; - switch (mWindowType) { - case NPWindowTypeWindow: - // We use 0=windowed since there is no specific NPDrawingModel value. - mode = 0; - break; - case NPWindowTypeDrawable: - mode = mDrawingModel + 1; - break; - default: - MOZ_ASSERT_UNREACHABLE("bad window type"); - return; - } - - if (mode == mLastRecordedDrawingModel) { - return; - } - MOZ_ASSERT(mode >= 0); - - mLastRecordedDrawingModel = mode; -} diff --git a/dom/plugins/ipc/PluginInstanceParent.h b/dom/plugins/ipc/PluginInstanceParent.h index 80d04242c..7c9febb24 100644 --- a/dom/plugins/ipc/PluginInstanceParent.h +++ b/dom/plugins/ipc/PluginInstanceParent.h @@ -1,5 +1,4 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- - * vim: sw=4 ts=4 et : * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ @@ -387,9 +386,6 @@ private: void SetCurrentImage(layers::Image* aImage); - // Update Telemetry with the current drawing model. - void RecordDrawingModel(); - private: PluginModuleParent* mParent; RefPtr<PluginAsyncSurrogate> mSurrogate; diff --git a/dom/plugins/ipc/PluginProcessParent.cpp b/dom/plugins/ipc/PluginProcessParent.cpp index b6efcdc64..444568135 100644 --- a/dom/plugins/ipc/PluginProcessParent.cpp +++ b/dom/plugins/ipc/PluginProcessParent.cpp @@ -1,5 +1,4 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- - * vim: sw=4 ts=4 et : * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ @@ -11,7 +10,6 @@ #include "mozilla/ipc/BrowserProcessSubThread.h" #include "mozilla/plugins/PluginMessageUtils.h" -#include "mozilla/Telemetry.h" #include "nsThreadUtils.h" using std::vector; diff --git a/dom/workers/ServiceWorkerRegistrar.h b/dom/workers/ServiceWorkerRegistrar.h index 6868599f2..810ee62a5 100644 --- a/dom/workers/ServiceWorkerRegistrar.h +++ b/dom/workers/ServiceWorkerRegistrar.h @@ -7,7 +7,6 @@ #define mozilla_dom_workers_ServiceWorkerRegistrar_h #include "mozilla/Monitor.h" -#include "mozilla/Telemetry.h" #include "nsClassHashtable.h" #include "nsIObserver.h" #include "nsCOMPtr.h" diff --git a/dom/xhr/XMLHttpRequestMainThread.cpp b/dom/xhr/XMLHttpRequestMainThread.cpp index c96f59ab6..9c9f4c648 100644 --- a/dom/xhr/XMLHttpRequestMainThread.cpp +++ b/dom/xhr/XMLHttpRequestMainThread.cpp @@ -65,7 +65,6 @@ #include "nsAsyncRedirectVerifyHelper.h" #include "nsStringBuffer.h" #include "nsIFileChannel.h" -#include "mozilla/Telemetry.h" #include "jsfriendapi.h" #include "GeckoProfiler.h" #include "mozilla/dom/EncodingUtils.h" diff --git a/dom/xhr/XMLHttpRequestWorker.cpp b/dom/xhr/XMLHttpRequestWorker.cpp index 8c68c4477..c8b45b9a4 100644 --- a/dom/xhr/XMLHttpRequestWorker.cpp +++ b/dom/xhr/XMLHttpRequestWorker.cpp @@ -21,7 +21,6 @@ #include "mozilla/dom/ProgressEvent.h" #include "mozilla/dom/StructuredCloneHolder.h" #include "mozilla/dom/URLSearchParams.h" -#include "mozilla/Telemetry.h" #include "nsComponentManagerUtils.h" #include "nsContentUtils.h" #include "nsJSUtils.h" diff --git a/dom/xul/nsXULPrototypeCache.cpp b/dom/xul/nsXULPrototypeCache.cpp index a73e2f8f0..5644405f5 100644 --- a/dom/xul/nsXULPrototypeCache.cpp +++ b/dom/xul/nsXULPrototypeCache.cpp @@ -26,7 +26,6 @@ #include "mozilla/Preferences.h" #include "mozilla/scache/StartupCache.h" #include "mozilla/scache/StartupCacheUtils.h" -#include "mozilla/Telemetry.h" using namespace mozilla; using namespace mozilla::scache; |