Backed out changeset 066e84750afd for landing with the wrong bug number.

--HG--
extra : histedit_source : c17fe1a5597236723dddd26d164c0ced6e7c0499
This commit is contained in:
Ryan VanderMeulen 2015-08-31 18:36:48 -04:00
parent eac1f62ecb
commit 6e496147ac
3 changed files with 5 additions and 25 deletions

View File

@ -6,7 +6,6 @@
#include "mozilla/dom/ChannelInfo.h"
#include "nsCOMPtr.h"
#include "nsContentUtils.h"
#include "nsIChannel.h"
#include "nsIDocument.h"
#include "nsIHttpChannel.h"
@ -69,20 +68,6 @@ ChannelInfo::InitFromChannel(nsIChannel* aChannel)
mInited = true;
}
void
ChannelInfo::InitFromChromeGlobal(nsIGlobalObject* aGlobal)
{
MOZ_ASSERT(!mInited, "Cannot initialize the object twice");
MOZ_ASSERT(aGlobal);
MOZ_RELEASE_ASSERT(
nsContentUtils::IsSystemPrincipal(aGlobal->PrincipalOrNull()));
mSecurityInfo.Truncate();
mRedirected = false;
mInited = true;
}
void
ChannelInfo::InitFromIPCChannelInfo(const ipc::IPCChannelInfo& aChannelInfo)
{

View File

@ -12,7 +12,6 @@
class nsIChannel;
class nsIDocument;
class nsIGlobalObject;
class nsIURI;
namespace mozilla {
@ -70,7 +69,6 @@ public:
void InitFromDocument(nsIDocument* aDoc);
void InitFromChannel(nsIChannel* aChannel);
void InitFromChromeGlobal(nsIGlobalObject* aGlobal);
void InitFromIPCChannelInfo(const IPCChannelInfo& aChannelInfo);
// This restores every possible information stored from a previous channel

View File

@ -162,15 +162,12 @@ Response::Constructor(const GlobalObject& aGlobal,
// Grab a valid channel info from the global so this response is 'valid' for
// interception.
if (NS_IsMainThread()) {
ChannelInfo info;
nsCOMPtr<nsPIDOMWindow> window = do_QueryInterface(global);
if (window) {
nsIDocument* doc = window->GetExtantDoc();
MOZ_ASSERT(doc);
info.InitFromDocument(doc);
} else {
info.InitFromChromeGlobal(global);
}
MOZ_ASSERT(window);
nsIDocument* doc = window->GetExtantDoc();
MOZ_ASSERT(doc);
ChannelInfo info;
info.InitFromDocument(doc);
internalResponse->InitChannelInfo(info);
} else {
workers::WorkerPrivate* worker = workers::GetCurrentThreadWorkerPrivate();