mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-27 10:57:34 +09:00
Merge remote-tracking branch 'origin/tracking' into custom
This commit is contained in:
commit
6de07653b9
368 changed files with 144 additions and 46366 deletions
|
|
@ -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/. */
|
||||
|
|
@ -8,7 +7,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"
|
||||
|
|
|
|||
|
|
@ -1405,22 +1405,6 @@ PeerConnectionObserver.prototype = {
|
|||
|
||||
handleIceConnectionStateChange: function(iceConnectionState) {
|
||||
let pc = this._dompc;
|
||||
if (pc.iceConnectionState === 'new') {
|
||||
var checking_histogram = Services.telemetry.getHistogramById("WEBRTC_ICE_CHECKING_RATE");
|
||||
if (iceConnectionState === 'checking') {
|
||||
checking_histogram.add(true);
|
||||
} else if (iceConnectionState === 'failed') {
|
||||
checking_histogram.add(false);
|
||||
}
|
||||
} else if (pc.iceConnectionState === 'checking') {
|
||||
var success_histogram = Services.telemetry.getHistogramById("WEBRTC_ICE_SUCCESS_RATE");
|
||||
if (iceConnectionState === 'completed' ||
|
||||
iceConnectionState === 'connected') {
|
||||
success_histogram.add(true);
|
||||
} else if (iceConnectionState === 'failed') {
|
||||
success_histogram.add(false);
|
||||
}
|
||||
}
|
||||
|
||||
if (iceConnectionState === 'failed') {
|
||||
pc.logError("ICE failed, see about:webrtc for more details");
|
||||
|
|
|
|||
|
|
@ -19,23 +19,8 @@ DetailedPromise::DetailedPromise(nsIGlobalObject* aGlobal,
|
|||
{
|
||||
}
|
||||
|
||||
DetailedPromise::DetailedPromise(nsIGlobalObject* aGlobal,
|
||||
const nsACString& aName,
|
||||
Telemetry::ID aSuccessLatencyProbe,
|
||||
Telemetry::ID aFailureLatencyProbe)
|
||||
: DetailedPromise(aGlobal, aName)
|
||||
{
|
||||
mSuccessLatencyProbe.Construct(aSuccessLatencyProbe);
|
||||
mFailureLatencyProbe.Construct(aFailureLatencyProbe);
|
||||
}
|
||||
|
||||
DetailedPromise::~DetailedPromise()
|
||||
{
|
||||
// It would be nice to assert that mResponded is identical to
|
||||
// GetPromiseState() == PromiseState::Rejected. But by now we've been
|
||||
// unlinked, so don't have a reference to our actual JS Promise object
|
||||
// anymore.
|
||||
MaybeReportTelemetry(Failed);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -45,8 +30,6 @@ DetailedPromise::MaybeReject(nsresult aArg, const nsACString& aReason)
|
|||
PromiseFlatCString(aReason).get());
|
||||
EME_LOG(msg.get());
|
||||
|
||||
MaybeReportTelemetry(Failed);
|
||||
|
||||
LogToBrowserConsole(NS_ConvertUTF8toUTF16(msg));
|
||||
|
||||
ErrorResult rv;
|
||||
|
|
@ -70,32 +53,5 @@ DetailedPromise::Create(nsIGlobalObject* aGlobal,
|
|||
return aRv.Failed() ? nullptr : promise.forget();
|
||||
}
|
||||
|
||||
/* static */ already_AddRefed<DetailedPromise>
|
||||
DetailedPromise::Create(nsIGlobalObject* aGlobal,
|
||||
ErrorResult& aRv,
|
||||
const nsACString& aName,
|
||||
Telemetry::ID aSuccessLatencyProbe,
|
||||
Telemetry::ID aFailureLatencyProbe)
|
||||
{
|
||||
RefPtr<DetailedPromise> promise = new DetailedPromise(aGlobal, aName, aSuccessLatencyProbe, aFailureLatencyProbe);
|
||||
promise->CreateWrapper(nullptr, aRv);
|
||||
return aRv.Failed() ? nullptr : promise.forget();
|
||||
}
|
||||
|
||||
void
|
||||
DetailedPromise::MaybeReportTelemetry(Status aStatus)
|
||||
{
|
||||
if (mResponded) {
|
||||
return;
|
||||
}
|
||||
mResponded = true;
|
||||
if (!mSuccessLatencyProbe.WasPassed() || !mFailureLatencyProbe.WasPassed()) {
|
||||
return;
|
||||
}
|
||||
uint32_t latency = (TimeStamp::Now() - mStartTime).ToMilliseconds();
|
||||
EME_LOG("%s %s latency %ums reported via telemetry", mName.get(),
|
||||
((aStatus == Succeeded) ? "succcess" : "failure"), latency);
|
||||
}
|
||||
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@
|
|||
#define __DetailedPromise_h__
|
||||
|
||||
#include "mozilla/dom/Promise.h"
|
||||
#include "mozilla/Telemetry.h"
|
||||
#include "EMEUtils.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
|
@ -26,17 +25,10 @@ public:
|
|||
ErrorResult& aRv,
|
||||
const nsACString& aName);
|
||||
|
||||
static already_AddRefed<DetailedPromise>
|
||||
Create(nsIGlobalObject* aGlobal, ErrorResult& aRv,
|
||||
const nsACString& aName,
|
||||
Telemetry::ID aSuccessLatencyProbe,
|
||||
Telemetry::ID aFailureLatencyProbe);
|
||||
|
||||
template <typename T>
|
||||
void MaybeResolve(const T& aArg)
|
||||
{
|
||||
EME_LOG("%s promise resolved", mName.get());
|
||||
MaybeReportTelemetry(Succeeded);
|
||||
Promise::MaybeResolve<T>(aArg);
|
||||
}
|
||||
|
||||
|
|
@ -50,20 +42,13 @@ private:
|
|||
explicit DetailedPromise(nsIGlobalObject* aGlobal,
|
||||
const nsACString& aName);
|
||||
|
||||
explicit DetailedPromise(nsIGlobalObject* aGlobal,
|
||||
const nsACString& aName,
|
||||
Telemetry::ID aSuccessLatencyProbe,
|
||||
Telemetry::ID aFailureLatencyProbe);
|
||||
virtual ~DetailedPromise();
|
||||
|
||||
enum Status { Succeeded, Failed };
|
||||
void MaybeReportTelemetry(Status aStatus);
|
||||
|
||||
nsCString mName;
|
||||
bool mResponded;
|
||||
TimeStamp mStartTime;
|
||||
Optional<Telemetry::ID> mSuccessLatencyProbe;
|
||||
Optional<Telemetry::ID> mFailureLatencyProbe;
|
||||
};
|
||||
|
||||
} // namespace dom
|
||||
|
|
|
|||
|
|
@ -92,17 +92,4 @@ KeySystemToGMPName(const nsAString& aKeySystem)
|
|||
return EmptyString();
|
||||
}
|
||||
|
||||
CDMType
|
||||
ToCDMTypeTelemetryEnum(const nsString& aKeySystem)
|
||||
{
|
||||
if (IsWidevineKeySystem(aKeySystem)) {
|
||||
return CDMType::eWidevine;
|
||||
} else if (IsClearkeyKeySystem(aKeySystem)) {
|
||||
return CDMType::eClearKey;
|
||||
} else if (IsPrimetimeKeySystem(aKeySystem)) {
|
||||
return CDMType::ePrimetime;
|
||||
}
|
||||
return CDMType::eUnknown;
|
||||
}
|
||||
|
||||
} // namespace mozilla
|
||||
|
|
|
|||
|
|
@ -103,9 +103,6 @@ enum CDMType {
|
|||
eUnknown = 3
|
||||
};
|
||||
|
||||
CDMType
|
||||
ToCDMTypeTelemetryEnum(const nsString& aKeySystem);
|
||||
|
||||
} // namespace mozilla
|
||||
|
||||
#endif // EME_LOG_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&
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue