Skip to content

Commit

Permalink
Bug 1846699 - fix a logic error in bug 1784880 which causes Raptor an…
Browse files Browse the repository at this point in the history
…d streaming videos to break; r=dlrobertson

Differential Revision: https://phabricator.services.mozilla.com/D185243
  • Loading branch information
wisniewskit committed Aug 3, 2023
1 parent 43c242a commit 4560409
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions dom/xhr/XMLHttpRequestMainThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -815,9 +815,6 @@ bool XMLHttpRequestMainThread::IsDeniedCrossSiteCORSRequest() {
Maybe<nsBaseChannel::ContentRange>
XMLHttpRequestMainThread::GetRequestedContentRange() const {
MOZ_ASSERT(mChannel);
if (!IsBlobURI(mRequestURL)) {
return mozilla::Nothing();
}
nsBaseChannel* baseChan = static_cast<nsBaseChannel*>(mChannel.get());
if (!baseChan) {
return mozilla::Nothing();
Expand Down Expand Up @@ -1915,7 +1912,7 @@ XMLHttpRequestMainThread::OnStartRequest(nsIRequest* request) {

// If we were asked for a bad range on a blob URL, but we're async,
// we should throw now in order to fire an error progress event.
if (GetRequestedContentRange().isNothing() &&
if (IsBlobURI(mRequestURL) && GetRequestedContentRange().isNothing() &&
mAuthorRequestHeaders.Has("range")) {
return NS_ERROR_NET_PARTIAL_TRANSFER;
}
Expand Down

0 comments on commit 4560409

Please sign in to comment.