mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 819791 - Part 2: Don't use nsTArray allocators in IPCMessageUtils traits. r=cjones
The allocators will be restricted to non-public use in a later patch.
This commit is contained in:
parent
900c0a0310
commit
075232ceca
@ -336,10 +336,10 @@ struct ParamTraits<nsString> : ParamTraits<nsAString>
|
||||
typedef nsString paramType;
|
||||
};
|
||||
|
||||
template <typename E, class A>
|
||||
struct ParamTraits<nsTArray<E, A> >
|
||||
template <typename E>
|
||||
struct ParamTraits<FallibleTArray<E> >
|
||||
{
|
||||
typedef nsTArray<E, A> paramType;
|
||||
typedef FallibleTArray<E> paramType;
|
||||
|
||||
static void Write(Message* aMsg, const paramType& aParam)
|
||||
{
|
||||
@ -380,12 +380,14 @@ struct ParamTraits<nsTArray<E, A> >
|
||||
};
|
||||
|
||||
template<typename E>
|
||||
struct ParamTraits<InfallibleTArray<E> > :
|
||||
ParamTraits<nsTArray<E, nsTArrayInfallibleAllocator> >
|
||||
struct ParamTraits<InfallibleTArray<E> >
|
||||
{
|
||||
typedef InfallibleTArray<E> paramType;
|
||||
|
||||
// use nsTArray Write() method
|
||||
static void Write(Message* aMsg, const paramType& aParam)
|
||||
{
|
||||
WriteParam(aMsg, static_cast<const FallibleTArray<E>&>(aParam));
|
||||
}
|
||||
|
||||
// deserialize the array fallibly, but return an InfallibleTArray
|
||||
static bool Read(const Message* aMsg, void** aIter, paramType* aResult)
|
||||
@ -398,7 +400,10 @@ struct ParamTraits<InfallibleTArray<E> > :
|
||||
return true;
|
||||
}
|
||||
|
||||
// use nsTArray Log() method
|
||||
static void Log(const paramType& aParam, std::wstring* aLog)
|
||||
{
|
||||
LogParam(static_cast<const FallibleTArray<E>&>(aParam), aLog);
|
||||
}
|
||||
};
|
||||
|
||||
template<>
|
||||
|
Loading…
Reference in New Issue
Block a user