зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 15edfaab92f6 (bug 1397128)
This commit is contained in:
Родитель
8114378053
Коммит
150c6ab212
|
@ -548,7 +548,7 @@ public:
|
|||
if (NS_WARN_IF(NS_FAILED(rv))) { return rv; }
|
||||
if (NS_WARN_IF(!stream)) { return NS_ERROR_FILE_NOT_FOUND; }
|
||||
|
||||
mStreamList->Add(mResponse.mBodyId, Move(stream));
|
||||
mStreamList->Add(mResponse.mBodyId, stream);
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
@ -614,7 +614,7 @@ public:
|
|||
if (NS_WARN_IF(NS_FAILED(rv))) { return rv; }
|
||||
if (NS_WARN_IF(!stream)) { return NS_ERROR_FILE_NOT_FOUND; }
|
||||
|
||||
mStreamList->Add(mSavedResponses[i].mBodyId, Move(stream));
|
||||
mStreamList->Add(mSavedResponses[i].mBodyId, stream);
|
||||
}
|
||||
|
||||
return rv;
|
||||
|
@ -1162,7 +1162,7 @@ public:
|
|||
if (NS_WARN_IF(NS_FAILED(rv))) { return rv; }
|
||||
if (NS_WARN_IF(!stream)) { return NS_ERROR_FILE_NOT_FOUND; }
|
||||
|
||||
mStreamList->Add(mSavedRequests[i].mBodyId, Move(stream));
|
||||
mStreamList->Add(mSavedRequests[i].mBodyId, stream);
|
||||
}
|
||||
|
||||
return rv;
|
||||
|
@ -1226,7 +1226,7 @@ public:
|
|||
if (NS_WARN_IF(NS_FAILED(rv))) { return rv; }
|
||||
if (NS_WARN_IF(!stream)) { return NS_ERROR_FILE_NOT_FOUND; }
|
||||
|
||||
mStreamList->Add(mSavedResponse.mBodyId, Move(stream));
|
||||
mStreamList->Add(mSavedResponse.mBodyId, stream);
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
|
|
@ -70,12 +70,15 @@ StreamList::Activate(CacheId aCacheId)
|
|||
}
|
||||
|
||||
void
|
||||
StreamList::Add(const nsID& aId, nsCOMPtr<nsIInputStream>&& aStream)
|
||||
StreamList::Add(const nsID& aId, nsIInputStream* aStream)
|
||||
{
|
||||
// All streams should be added on IO thread before we set the stream
|
||||
// control on the owning IPC thread.
|
||||
MOZ_DIAGNOSTIC_ASSERT(!mStreamControl);
|
||||
mList.AppendElement(Entry(aId, Move(aStream)));
|
||||
MOZ_DIAGNOSTIC_ASSERT(aStream);
|
||||
Entry* entry = mList.AppendElement();
|
||||
entry->mId = aId;
|
||||
entry->mStream = aStream;
|
||||
}
|
||||
|
||||
already_AddRefed<nsIInputStream>
|
||||
|
|
|
@ -31,7 +31,7 @@ public:
|
|||
|
||||
void Activate(CacheId aCacheId);
|
||||
|
||||
void Add(const nsID& aId, nsCOMPtr<nsIInputStream>&& aStream);
|
||||
void Add(const nsID& aId, nsIInputStream* aStream);
|
||||
already_AddRefed<nsIInputStream> Extract(const nsID& aId);
|
||||
|
||||
void NoteClosed(const nsID& aId);
|
||||
|
@ -47,11 +47,6 @@ private:
|
|||
~StreamList();
|
||||
struct Entry
|
||||
{
|
||||
explicit Entry(const nsID& aId, nsCOMPtr<nsIInputStream>&& aStream)
|
||||
: mId(aId)
|
||||
, mStream(Move(aStream))
|
||||
{}
|
||||
|
||||
nsID mId;
|
||||
nsCOMPtr<nsIInputStream> mStream;
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче