diff --git a/ipc/glue/IPCStreamUtils.cpp b/ipc/glue/IPCStreamUtils.cpp index 2e3984de815e..0213c7750b31 100644 --- a/ipc/glue/IPCStreamUtils.cpp +++ b/ipc/glue/IPCStreamUtils.cpp @@ -551,7 +551,7 @@ Maybe& AutoIPCStream::TakeOptionalValue() { void IPDLParamTraits::Write(IPC::Message* aMsg, IProtocol* aActor, nsIInputStream* aParam) { - auto autoStream = MakeRefPtr(); + auto autoStream = MakeRefPtr(/* aDelayedStart */ true); bool ok = false; bool found = false; diff --git a/ipc/glue/IPCStreamUtils.h b/ipc/glue/IPCStreamUtils.h index da854722478f..27c92debe5e9 100644 --- a/ipc/glue/IPCStreamUtils.h +++ b/ipc/glue/IPCStreamUtils.h @@ -200,6 +200,8 @@ class HoldIPCStream final : public AutoIPCStream { public: NS_INLINE_DECL_REFCOUNTING(HoldIPCStream) + using AutoIPCStream::AutoIPCStream; + private: ~HoldIPCStream() = default; };