Loading dom/media/webrtc/WebrtcGlobal.h +0 −36 Original line number Diff line number Diff line Loading @@ -16,42 +16,6 @@ typedef mozilla::dom::Sequence<nsString> WebrtcGlobalLog; namespace IPC { template<typename T> struct ParamTraits<mozilla::dom::Optional<T>> { typedef mozilla::dom::Optional<T> paramType; static void Write(Message* aMsg, const paramType& aParam) { if (aParam.WasPassed()) { WriteParam(aMsg, true); WriteParam(aMsg, aParam.Value()); return; } WriteParam(aMsg, false); } static bool Read(const Message* aMsg, PickleIterator* aIter, paramType* aResult) { bool was_passed = false; if (!ReadParam(aMsg, aIter, &was_passed)) { return false; } aResult->Reset(); //XXX Optional_base seems to reach this point with isSome true. if (was_passed) { if (!ReadParam(aMsg, aIter, &(aResult->Construct()))) { return false; } } return true; } }; template<typename T> struct ParamTraits<mozilla::dom::Sequence<T>> { Loading ipc/glue/IPCMessageUtils.h +36 −0 Original line number Diff line number Diff line Loading @@ -979,6 +979,42 @@ struct ParamTraits<mozilla::Variant<Ts...>> } }; template<typename T> struct ParamTraits<mozilla::dom::Optional<T>> { typedef mozilla::dom::Optional<T> paramType; static void Write(Message* aMsg, const paramType& aParam) { if (aParam.WasPassed()) { WriteParam(aMsg, true); WriteParam(aMsg, aParam.Value()); return; } WriteParam(aMsg, false); } static bool Read(const Message* aMsg, PickleIterator* aIter, paramType* aResult) { bool wasPassed = false; if (!ReadParam(aMsg, aIter, &wasPassed)) { return false; } aResult->Reset(); if (wasPassed) { if (!ReadParam(aMsg, aIter, &aResult->Construct())) { return false; } } return true; } }; } /* namespace IPC */ #endif /* __IPC_GLUE_IPCMESSAGEUTILS_H__ */ Loading
dom/media/webrtc/WebrtcGlobal.h +0 −36 Original line number Diff line number Diff line Loading @@ -16,42 +16,6 @@ typedef mozilla::dom::Sequence<nsString> WebrtcGlobalLog; namespace IPC { template<typename T> struct ParamTraits<mozilla::dom::Optional<T>> { typedef mozilla::dom::Optional<T> paramType; static void Write(Message* aMsg, const paramType& aParam) { if (aParam.WasPassed()) { WriteParam(aMsg, true); WriteParam(aMsg, aParam.Value()); return; } WriteParam(aMsg, false); } static bool Read(const Message* aMsg, PickleIterator* aIter, paramType* aResult) { bool was_passed = false; if (!ReadParam(aMsg, aIter, &was_passed)) { return false; } aResult->Reset(); //XXX Optional_base seems to reach this point with isSome true. if (was_passed) { if (!ReadParam(aMsg, aIter, &(aResult->Construct()))) { return false; } } return true; } }; template<typename T> struct ParamTraits<mozilla::dom::Sequence<T>> { Loading
ipc/glue/IPCMessageUtils.h +36 −0 Original line number Diff line number Diff line Loading @@ -979,6 +979,42 @@ struct ParamTraits<mozilla::Variant<Ts...>> } }; template<typename T> struct ParamTraits<mozilla::dom::Optional<T>> { typedef mozilla::dom::Optional<T> paramType; static void Write(Message* aMsg, const paramType& aParam) { if (aParam.WasPassed()) { WriteParam(aMsg, true); WriteParam(aMsg, aParam.Value()); return; } WriteParam(aMsg, false); } static bool Read(const Message* aMsg, PickleIterator* aIter, paramType* aResult) { bool wasPassed = false; if (!ReadParam(aMsg, aIter, &wasPassed)) { return false; } aResult->Reset(); if (wasPassed) { if (!ReadParam(aMsg, aIter, &aResult->Construct())) { return false; } } return true; } }; } /* namespace IPC */ #endif /* __IPC_GLUE_IPCMESSAGEUTILS_H__ */