Bug 711866 - Don't null deref when shutting down during media load algorithm. r=roc

This commit is contained in:
Chris Pearce 2012-01-06 19:40:51 +13:00
parent 09267e90dd
commit 756594de5d

View File

@ -302,6 +302,11 @@ NS_IMETHODIMP nsHTMLMediaElement::MediaLoadListener::OnStartRequest(nsIRequest*
{
nsContentUtils::UnregisterShutdownObserver(this);
if (!mElement) {
// We've been notified by the shutdown observer, and are shutting down.
return NS_BINDING_ABORTED;
}
// The element is only needed until we've had a chance to call
// InitializeDecoderForChannel. So make sure mElement is cleared here.
nsRefPtr<nsHTMLMediaElement> element;