mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-31 11:37:30 +09:00
Issue #21 - Remove Telemetry plumbing and fix build.
Note this won't give working applications. Requires FE changes and additional js module changes (next part).
This commit is contained in:
parent
92a1cc3139
commit
8d800b1cb0
205 changed files with 45 additions and 40519 deletions
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -127,7 +127,6 @@
|
|||
#include "nsWrapperCacheInlines.h"
|
||||
#include "xpcpublic.h"
|
||||
#include "nsIScriptError.h"
|
||||
#include "mozilla/Telemetry.h"
|
||||
|
||||
#include "mozilla/CORSMode.h"
|
||||
#include "mozilla/dom/ShadowRoot.h"
|
||||
|
|
|
|||
|
|
@ -117,7 +117,6 @@
|
|||
#include "nsCycleCollector.h"
|
||||
#include "xpcpublic.h"
|
||||
#include "nsIScriptError.h"
|
||||
#include "mozilla/Telemetry.h"
|
||||
|
||||
#include "mozilla/CORSMode.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -1629,9 +1628,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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -24,8 +24,6 @@
|
|||
|
||||
using mozilla::ipc::GeckoChildProcessHost;
|
||||
|
||||
#include "mozilla/Telemetry.h"
|
||||
|
||||
#ifdef XP_WIN
|
||||
#include "WMFDecoderModule.h"
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -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__))
|
||||
|
|
@ -250,10 +248,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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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&
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -769,8 +769,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
|
||||
|
|
@ -907,7 +905,6 @@ PluginInstanceParent::RecvShow(const NPRect& updatedRect,
|
|||
PLUGIN_LOG_DEBUG((" (RecvShow invalidated for surface %p)",
|
||||
mFrontSurface.get()));
|
||||
|
||||
RecordDrawingModel();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -1273,7 +1270,6 @@ PluginInstanceParent::NPP_SetWindow(const NPWindow* aWindow)
|
|||
return NPERR_GENERIC_ERROR;
|
||||
}
|
||||
|
||||
RecordDrawingModel();
|
||||
return NPERR_NO_ERROR;
|
||||
}
|
||||
|
||||
|
|
@ -2232,28 +2228,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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue