Bug 1226909 followup to fix bustage. Make sure that the channel returned by NS_NewChannel doesn't have a loadinfo that indicates that the channel has already been opened

This commit is contained in:
Jonas Sicking 2015-12-06 23:50:49 -05:00
parent f3a55f6e46
commit dc10e69700

View File

@ -18,6 +18,7 @@
#include "nsIStreamConverterService.h"
#include "nsIPipe.h"
#include "nsNetUtil.h"
#include "LoadInfo.h"
namespace mozilla {
@ -121,6 +122,10 @@ ExtensionProtocolHandler::SubstituteChannel(nsIURI* aURI,
aURI, getter_AddRefs(converter));
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsILoadInfo> loadInfo =
static_cast<mozilla::LoadInfo*>(aLoadInfo)->CloneForNewRequest();
(*result)->SetLoadInfo(loadInfo);
rv = (*result)->AsyncOpen2(converter);
} else {
// Stylesheet loads for extension content scripts require a sync channel,