Backed out 7 changesets (bug 1919123) for causing bustage on Perfetto.h
Backed out changeset 6087d664bcd2 (bug 1919123) Backed out changeset f001159e1cf6 (bug 1919123) Backed out changeset 450d5838e19b (bug 1919123) Backed out changeset d6cf9c0e1864 (bug 1919123) Backed out changeset 2f0e85370167 (bug 1919123) Backed out changeset 87f32f135dc4 (bug 1919123) Backed out changeset a956f1fd39e6 (bug 1919123)
This commit is contained in:
@@ -24,7 +24,6 @@
|
||||
#include "FrameStatistics.h"
|
||||
#include "GMPCrashHelper.h"
|
||||
#include "GVAutoplayPermissionRequest.h"
|
||||
#include "nsString.h"
|
||||
#ifdef MOZ_ANDROID_HLS_SUPPORT
|
||||
# include "HLSDecoder.h"
|
||||
#endif
|
||||
@@ -35,7 +34,6 @@
|
||||
#include "MediaError.h"
|
||||
#include "MediaManager.h"
|
||||
#include "MediaMetadataManager.h"
|
||||
#include "MediaProfilerMarkers.h"
|
||||
#include "MediaResource.h"
|
||||
#include "MediaShutdownManager.h"
|
||||
#include "MediaSourceDecoder.h"
|
||||
@@ -2695,12 +2693,6 @@ void HTMLMediaElement::SelectResource() {
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
LOG(LogLevel::Debug, ("%p Trying load from src=%s", this,
|
||||
NS_ConvertUTF16toUTF8(src).get()));
|
||||
if (profiler_is_collecting_markers()) {
|
||||
nsPrintfCString markerName{"%p:mozloadresource", this};
|
||||
profiler_add_marker(markerName, geckoprofiler::category::MEDIA_PLAYBACK,
|
||||
{}, LoadSourceMarker{}, src, u""_ns, u""_ns);
|
||||
}
|
||||
|
||||
NS_ASSERTION(
|
||||
!mIsLoadingFromSourceChildren,
|
||||
"Should think we're not loading from source children by default");
|
||||
@@ -2755,16 +2747,11 @@ void HTMLMediaElement::NotifyLoadError(const nsACString& aErrorDetails) {
|
||||
LOG(LogLevel::Debug, ("NotifyLoadError(), no supported media error"));
|
||||
NoSupportedMediaSourceError(aErrorDetails);
|
||||
} else if (mSourceLoadCandidate) {
|
||||
DispatchAsyncSourceError(mSourceLoadCandidate, aErrorDetails);
|
||||
DispatchAsyncSourceError(mSourceLoadCandidate);
|
||||
QueueLoadFromSourceTask();
|
||||
} else {
|
||||
NS_WARNING("Should know the source we were loading from!");
|
||||
}
|
||||
if (profiler_is_collecting_markers()) {
|
||||
profiler_add_marker(nsPrintfCString("%p:mozloaderror", this),
|
||||
geckoprofiler::category::MEDIA_PLAYBACK, {},
|
||||
LoadErrorMarker{}, aErrorDetails);
|
||||
}
|
||||
}
|
||||
|
||||
void HTMLMediaElement::NotifyMediaTrackAdded(dom::MediaTrack* aTrack) {
|
||||
@@ -2895,7 +2882,7 @@ void HTMLMediaElement::DealWithFailedElement(nsIContent* aSourceElement) {
|
||||
return;
|
||||
}
|
||||
|
||||
DispatchAsyncSourceError(aSourceElement, "Failed load on source element"_ns);
|
||||
DispatchAsyncSourceError(aSourceElement);
|
||||
GetMainThreadSerialEventTarget()->Dispatch(
|
||||
NewRunnableMethod("HTMLMediaElement::QueueLoadFromSourceTask", this,
|
||||
&HTMLMediaElement::QueueLoadFromSourceTask));
|
||||
@@ -2981,12 +2968,6 @@ void HTMLMediaElement::LoadFromSourceChildren() {
|
||||
NS_ConvertUTF16toUTF8(src).get(), NS_ConvertUTF16toUTF8(type).get(),
|
||||
NS_ConvertUTF16toUTF8(media).get()));
|
||||
|
||||
if (profiler_is_collecting_markers()) {
|
||||
nsPrintfCString markerName{"%p:mozloadresource", this};
|
||||
profiler_add_marker(markerName, geckoprofiler::category::MEDIA_PLAYBACK,
|
||||
{}, LoadSourceMarker{}, src, type, media);
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIURI> uri;
|
||||
NewURIFromString(src, getter_AddRefs(uri));
|
||||
if (!uri) {
|
||||
@@ -3022,7 +3003,7 @@ void HTMLMediaElement::LoadFromSourceChildren() {
|
||||
}
|
||||
|
||||
// If we fail to load, loop back and try loading the next resource.
|
||||
DispatchAsyncSourceError(child, "Failed load on resource"_ns);
|
||||
DispatchAsyncSourceError(child);
|
||||
}
|
||||
MOZ_ASSERT_UNREACHABLE("Execution should not reach here!");
|
||||
}
|
||||
@@ -5604,7 +5585,7 @@ void HTMLMediaElement::DecodeError(const MediaResult& aError) {
|
||||
if (mIsLoadingFromSourceChildren) {
|
||||
mErrorSink->ResetError();
|
||||
if (mSourceLoadCandidate) {
|
||||
DispatchAsyncSourceError(mSourceLoadCandidate, aError.Message());
|
||||
DispatchAsyncSourceError(mSourceLoadCandidate);
|
||||
QueueLoadFromSourceTask();
|
||||
} else {
|
||||
NS_WARNING("Should know the source we were loading from!");
|
||||
@@ -6657,12 +6638,11 @@ void HTMLMediaElement::NotifyShutdownEvent() {
|
||||
AddRemoveSelfReference();
|
||||
}
|
||||
|
||||
void HTMLMediaElement::DispatchAsyncSourceError(
|
||||
nsIContent* aSourceElement, const nsACString& aErrorDetails) {
|
||||
void HTMLMediaElement::DispatchAsyncSourceError(nsIContent* aSourceElement) {
|
||||
LOG_EVENT(LogLevel::Debug, ("%p Queuing simple source error event", this));
|
||||
|
||||
nsCOMPtr<nsIRunnable> event =
|
||||
new nsSourceErrorEventRunner(this, aSourceElement, aErrorDetails);
|
||||
new nsSourceErrorEventRunner(this, aSourceElement);
|
||||
GetMainThreadSerialEventTarget()->Dispatch(event.forget());
|
||||
}
|
||||
|
||||
@@ -7076,15 +7056,6 @@ void HTMLMediaElement::MakeAssociationWithCDMResolved() {
|
||||
// 5.6 Resolve promise.
|
||||
mSetMediaKeysDOMPromise->MaybeResolveWithUndefined();
|
||||
mSetMediaKeysDOMPromise = nullptr;
|
||||
|
||||
if (profiler_is_collecting_markers()) {
|
||||
nsAutoString keySystem;
|
||||
mMediaKeys->GetKeySystem(keySystem);
|
||||
profiler_add_marker(nsPrintfCString("%p:mozcdmresolved", this),
|
||||
geckoprofiler::category::MEDIA_PLAYBACK, {},
|
||||
CDMResolvedMarker{}, keySystem,
|
||||
mMediaKeys->GetMediaKeySystemConfigurationString());
|
||||
}
|
||||
}
|
||||
|
||||
bool HTMLMediaElement::TryMakeAssociationWithCDM(CDMProxy* aProxy) {
|
||||
@@ -7250,10 +7221,6 @@ void HTMLMediaElement::DispatchEncrypted(const nsTArray<uint8_t>& aInitData,
|
||||
RefPtr<AsyncEventDispatcher> asyncDispatcher =
|
||||
new AsyncEventDispatcher(this, event.forget());
|
||||
asyncDispatcher->PostDOMEvent();
|
||||
if (profiler_is_collecting_markers()) {
|
||||
nsPrintfCString markerName{"%p:encrypted", this};
|
||||
PROFILER_MARKER_UNTYPED(markerName, MEDIA_PLAYBACK);
|
||||
}
|
||||
}
|
||||
|
||||
bool HTMLMediaElement::IsEventAttributeNameInternal(nsAtom* aName) {
|
||||
|
||||
Reference in New Issue
Block a user