Backout changeset ebd274828b7f (bug 791378) because it seems like the channel created is associated with a load context

This commit is contained in:
Ehsan Akhgari 2012-09-19 15:56:08 -04:00
parent 2e191772f7
commit ed75b79d89

View File

@ -121,7 +121,6 @@
#include "nsIImageLoadingContent.h"
#include "mozilla/Preferences.h"
#include "nsVersionComparator.h"
#include "nsIPrivateBrowsingChannel.h"
#if defined(XP_WIN)
#include "nsIWindowMediator.h"
@ -3174,18 +3173,6 @@ nsresult nsPluginHost::NewPluginURLStream(const nsString& aURL,
NS_ENSURE_SUCCESS(rv,rv);
}
}
// Override the privacy state of the channel based on that of the document
if (doc) {
nsILoadContext* loadContext = doc->GetLoadContext();
if (loadContext) {
nsCOMPtr<nsIPrivateBrowsingChannel> pbChannel = do_QueryInterface(channel);
if (pbChannel) {
pbChannel->SetPrivate(loadContext->UsePrivateBrowsing());
}
}
}
rv = channel->AsyncOpen(listenerPeer, nullptr);
if (NS_SUCCEEDED(rv))
listenerPeer->TrackRequest(channel);