зеркало из https://github.com/mozilla/gecko-dev.git
Bug 759257: Remove InfallableCopyCString [sic], r=hurley
This commit is contained in:
Родитель
72fa33bb6e
Коммит
c72dd4e458
|
@ -110,13 +110,6 @@ struct ParamTraits<nsHttpHeaderArray::nsEntry>
|
|||
};
|
||||
|
||||
|
||||
template<>
|
||||
struct ParamTraits<mozilla::net::InfallableCopyCString>
|
||||
: public ParamTraits<nsCString>
|
||||
{
|
||||
};
|
||||
|
||||
|
||||
template<>
|
||||
struct ParamTraits<nsHttpHeaderArray>
|
||||
{
|
||||
|
|
|
@ -251,10 +251,10 @@ private:
|
|||
const uint32_t mLoadFlags;
|
||||
const bool mCacheForOfflineUse;
|
||||
const bool mFallbackChannel;
|
||||
const InfallableCopyCString mClientID;
|
||||
const nsCString mClientID;
|
||||
const nsCacheStoragePolicy mStoragePolicy;
|
||||
const bool mUsingPrivateBrowsing;
|
||||
const InfallableCopyCString mCacheKey;
|
||||
const nsCString mCacheKey;
|
||||
const nsCacheAccessMode mAccessToRequest;
|
||||
const bool mNoWait;
|
||||
const bool mUsingSSL;
|
||||
|
|
|
@ -14,36 +14,6 @@
|
|||
#include "nsCOMPtr.h"
|
||||
#include "nsString.h"
|
||||
|
||||
namespace mozilla { namespace net {
|
||||
|
||||
// A nsCString that aborts if it fails to successfully copy its input during
|
||||
// copy construction and/or assignment. This is useful for building classes
|
||||
// that are safely copy-constructable and safely assignable using the compiler-
|
||||
// generated copy constructor and assignment operator.
|
||||
class InfallableCopyCString : public nsCString
|
||||
{
|
||||
public:
|
||||
InfallableCopyCString() { }
|
||||
InfallableCopyCString(const nsACString & other)
|
||||
: nsCString(other)
|
||||
{
|
||||
if (Length() != other.Length())
|
||||
NS_RUNTIMEABORT("malloc");
|
||||
}
|
||||
|
||||
InfallableCopyCString & operator=(const nsACString & other)
|
||||
{
|
||||
nsCString::operator=(other);
|
||||
|
||||
if (Length() != other.Length())
|
||||
NS_RUNTIMEABORT("malloc");
|
||||
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
|
||||
} } // namespace mozilla::net
|
||||
|
||||
class nsHttpHeaderArray
|
||||
{
|
||||
public:
|
||||
|
@ -93,7 +63,7 @@ public:
|
|||
struct nsEntry
|
||||
{
|
||||
nsHttpAtom header;
|
||||
mozilla::net::InfallableCopyCString value;
|
||||
nsCString value;
|
||||
|
||||
struct MatchHeader {
|
||||
bool Equals(const nsEntry &entry, const nsHttpAtom &header) const {
|
||||
|
|
|
@ -67,7 +67,7 @@ private:
|
|||
nsHttpHeaderArray mHeaders;
|
||||
nsHttpAtom mMethod;
|
||||
nsHttpVersion mVersion;
|
||||
mozilla::net::InfallableCopyCString mRequestURI;
|
||||
nsCString mRequestURI;
|
||||
};
|
||||
|
||||
#endif // nsHttpRequestHead_h__
|
||||
|
|
|
@ -121,10 +121,10 @@ private:
|
|||
nsHttpHeaderArray mHeaders;
|
||||
nsHttpVersion mVersion;
|
||||
uint16_t mStatus;
|
||||
mozilla::net::InfallableCopyCString mStatusText;
|
||||
nsCString mStatusText;
|
||||
int64_t mContentLength;
|
||||
mozilla::net::InfallableCopyCString mContentType;
|
||||
mozilla::net::InfallableCopyCString mContentCharset;
|
||||
nsCString mContentType;
|
||||
nsCString mContentCharset;
|
||||
bool mCacheControlNoStore;
|
||||
bool mCacheControlNoCache;
|
||||
bool mPragmaNoCache;
|
||||
|
|
Загрузка…
Ссылка в новой задаче