зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 8ac015e40755 (bug 1441153) for web platform tests failre on media files
This commit is contained in:
Родитель
cafaae9ee7
Коммит
b9c4533603
|
@ -153,21 +153,6 @@ ChannelMediaDecoder::ResourceCallback::NotifyPrincipalChanged()
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
ChannelMediaDecoder::NotifyPrincipalChanged()
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
MediaDecoder::NotifyPrincipalChanged();
|
||||
if (!mSameOriginMedia &&
|
||||
DecoderTraits::CrossOriginRedirectsProhibited(ContainerType())) {
|
||||
// For some content types we block channel redirects to cross origin
|
||||
// destinations due to security constraints. See bug 1441153.
|
||||
LOG("ChannnelMediaDecoder prohibited cross origin redirect blocked.");
|
||||
NetworkError(MediaResult(NS_ERROR_DOM_BAD_URI,
|
||||
"Prohibited cross origin redirect blocked"));
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ChannelMediaDecoder::ResourceCallback::NotifySuspendedStatusChanged(
|
||||
bool aSuspendedByCache)
|
||||
|
|
|
@ -66,7 +66,6 @@ protected:
|
|||
void MetadataLoaded(UniquePtr<MediaInfo> aInfo,
|
||||
UniquePtr<MetadataTags> aTags,
|
||||
MediaDecoderEventVisibility aEventVisibility) override;
|
||||
void NotifyPrincipalChanged() override;
|
||||
|
||||
RefPtr<ResourceCallback> mResourceCallback;
|
||||
RefPtr<BaseMediaResource> mResource;
|
||||
|
|
|
@ -325,11 +325,4 @@ bool DecoderTraits::IsSupportedInVideoDocument(const nsACString& aType)
|
|||
false;
|
||||
}
|
||||
|
||||
/* static */
|
||||
bool
|
||||
DecoderTraits::CrossOriginRedirectsProhibited(const MediaContainerType& aType)
|
||||
{
|
||||
return WaveDecoder::IsSupportedType(aType);
|
||||
}
|
||||
|
||||
} // namespace mozilla
|
||||
|
|
|
@ -57,10 +57,6 @@ public:
|
|||
static bool IsMatroskaType(const MediaContainerType& aType);
|
||||
|
||||
static bool IsSupportedType(const MediaContainerType& aType);
|
||||
|
||||
// For some content types we block channel redirects to cross origin
|
||||
// destinations due to security constraints. See bug 1441153.
|
||||
static bool CrossOriginRedirectsProhibited(const MediaContainerType& aType);
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
|
|
@ -514,7 +514,7 @@ protected:
|
|||
|
||||
// Called by MediaResource when the principal of the resource has
|
||||
// changed. Called on main thread only.
|
||||
virtual void NotifyPrincipalChanged();
|
||||
void NotifyPrincipalChanged();
|
||||
|
||||
MozPromiseRequestHolder<SeekPromise> mSeekRequest;
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ function initTest(test, token) {
|
|||
var win = window.open();
|
||||
var video = win.document.createElement("video");
|
||||
video.autoplay = true;
|
||||
video.src = window.origin + "/tests/dom/media/test/" + test.name;
|
||||
video.src = "http://example.com/tests/dom/media/test/" + test.name;
|
||||
win.document.body.appendChild(video);
|
||||
video.currentTime = test.duration / 2;
|
||||
video.addEventListener("seeking", () => {
|
||||
|
|
Загрузка…
Ссылка в новой задаче