mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 00:35:44 +00:00
Bug 485471. nsHTMLMediaElement's mChannel should be updated when redirects happen. r=bzbarsky,sr=roc
This commit is contained in:
parent
ba13940408
commit
f3be9df7f6
@ -311,6 +311,14 @@ protected:
|
||||
*/
|
||||
void ChangeDelayLoadStatus(PRBool aDelay);
|
||||
|
||||
/**
|
||||
* Called when our channel is redirected to another channel.
|
||||
* Updates our mChannel reference to aNewChannel.
|
||||
*/
|
||||
nsresult OnChannelRedirect(nsIChannel *aChannel,
|
||||
nsIChannel *aNewChannel,
|
||||
PRUint32 aFlags);
|
||||
|
||||
nsRefPtr<nsMediaDecoder> mDecoder;
|
||||
|
||||
// Holds a reference to the first channel we open to the media resource.
|
||||
|
@ -262,6 +262,8 @@ NS_IMETHODIMP nsHTMLMediaElement::MediaLoadListener::OnChannelRedirect(nsIChanne
|
||||
nsIChannel* aNewChannel,
|
||||
PRUint32 aFlags)
|
||||
{
|
||||
if (mElement)
|
||||
mElement->OnChannelRedirect(aOldChannel, aNewChannel, aFlags);
|
||||
nsCOMPtr<nsIChannelEventSink> sink = do_QueryInterface(mNextListener);
|
||||
if (sink)
|
||||
return sink->OnChannelRedirect(aOldChannel, aNewChannel, aFlags);
|
||||
@ -345,6 +347,16 @@ NS_IMETHODIMP nsHTMLMediaElement::GetNetworkState(PRUint16 *aNetworkState)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsHTMLMediaElement::OnChannelRedirect(nsIChannel *aChannel,
|
||||
nsIChannel *aNewChannel,
|
||||
PRUint32 aFlags)
|
||||
{
|
||||
NS_ASSERTION(aChannel == mChannel, "Channels should match!");
|
||||
mChannel = aNewChannel;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void nsHTMLMediaElement::AbortExistingLoads()
|
||||
{
|
||||
// Abort any already-running instance of the resource selection algorithm.
|
||||
|
Loading…
Reference in New Issue
Block a user