diff --git a/netwerk/protocol/http/src/nsHTTPRequest.cpp b/netwerk/protocol/http/src/nsHTTPRequest.cpp index 8a547434ccf..541ac4b5ace 100644 --- a/netwerk/protocol/http/src/nsHTTPRequest.cpp +++ b/netwerk/protocol/http/src/nsHTTPRequest.cpp @@ -682,7 +682,8 @@ nsHTTPPipelinedRequest::WriteRequest(nsIInputStream *aRequestStream) req->mConnection->GetLoadAttributes(&loadAttributes); nsCOMPtr callbacks; - req->mConnection->GetNotificationCallbacks(getter_AddRefs(callbacks)); + + callbacks = do_QueryInterface(NS_STATIC_CAST(nsIHTTPChannel*, req->mConnection)); mTransport->SetNotificationCallbacks(callbacks, (loadAttributes & nsIChannel::LOAD_BACKGROUND)); } @@ -1148,7 +1149,8 @@ nsHTTPPipelinedRequest::AdvanceToNextRequest() req->mConnection->GetLoadAttributes(&flags); nsCOMPtr callbacks; - mTransport->GetNotificationCallbacks(getter_AddRefs(callbacks)); + + callbacks = do_QueryInterface(NS_STATIC_CAST(nsIHTTPChannel*, req->mConnection)); mTransport->SetNotificationCallbacks(callbacks, (flags & nsIChannel::LOAD_BACKGROUND)); NS_RELEASE(req);