Bug 1919123 - part6 : add markers to show load details. r=media-playback-reviewers,aosmond
Differential Revision: https://phabricator.services.mozilla.com/D222895
This commit is contained in:
@@ -2695,6 +2695,13 @@ 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{}, nsString{src}, nsString{},
|
||||
nsString{});
|
||||
}
|
||||
|
||||
NS_ASSERTION(
|
||||
!mIsLoadingFromSourceChildren,
|
||||
"Should think we're not loading from source children by default");
|
||||
@@ -2975,6 +2982,13 @@ 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{}, nsString{src}, nsString{type},
|
||||
nsString{media});
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIURI> uri;
|
||||
NewURIFromString(src, getter_AddRefs(uri));
|
||||
if (!uri) {
|
||||
|
||||
Reference in New Issue
Block a user