# HG changeset patch # User Gabriele Svelto # Date 1557842779 0 # Node ID ef9124d5d07fc1799ab0aa19a23998f119b43732 # Parent 9ee72f5c33916aee4eb724f25b5d1b9487ee1f72 Bug 1547698 - Remove unused IPC methods for taking minidumps r=froydnj This removes the XRE_TakeMinidumpForChild() which does not need to be exposed anymore in the XUL API as well as IToplevelProtocol::TakeMinidump() which was simply unused. Differential Revision: https://phabricator.services.mozilla.com/D31062 diff --git a/ipc/glue/CrashReporterHost.cpp b/ipc/glue/CrashReporterHost.cpp --- a/ipc/glue/CrashReporterHost.cpp +++ b/ipc/glue/CrashReporterHost.cpp @@ -31,18 +31,18 @@ bool CrashReporterHost::GenerateCrashRep return FinalizeCrashReport(); } RefPtr CrashReporterHost::TakeCrashedChildMinidump( base::ProcessId aPid, uint32_t* aOutSequence) { MOZ_ASSERT(!HasMinidump()); RefPtr crashDump; - if (!XRE_TakeMinidumpForChild(aPid, getter_AddRefs(crashDump), - aOutSequence)) { + if (!CrashReporter::TakeMinidumpForChild(aPid, getter_AddRefs(crashDump), + aOutSequence)) { return nullptr; } if (!AdoptMinidump(crashDump)) { return nullptr; } return crashDump.get(); } diff --git a/ipc/glue/ProtocolUtils.cpp b/ipc/glue/ProtocolUtils.cpp --- a/ipc/glue/ProtocolUtils.cpp +++ b/ipc/glue/ProtocolUtils.cpp @@ -602,23 +602,16 @@ IToplevelProtocol::OtherPid() const void IToplevelProtocol::SetOtherProcessId(base::ProcessId aOtherPid) { mOtherPid = aOtherPid; } bool -IToplevelProtocol::TakeMinidump(nsIFile** aDump, uint32_t* aSequence) -{ - MOZ_RELEASE_ASSERT(GetSide() == ParentSide); - return XRE_TakeMinidumpForChild(OtherPid(), aDump, aSequence); -} - -bool IToplevelProtocol::Open(mozilla::ipc::Transport* aTransport, base::ProcessId aOtherPid, MessageLoop* aThread, mozilla::ipc::Side aSide) { SetOtherProcessId(aOtherPid); return GetIPCChannel()->Open(aTransport, aThread, aSide); } diff --git a/ipc/glue/ProtocolUtils.h b/ipc/glue/ProtocolUtils.h --- a/ipc/glue/ProtocolUtils.h +++ b/ipc/glue/ProtocolUtils.h @@ -280,18 +280,16 @@ public: Transport* GetTransport() const { return mTrans.get(); } ProtocolId GetProtocolId() const { return mProtocolId; } base::ProcessId OtherPid() const override; void SetOtherProcessId(base::ProcessId aOtherPid); - bool TakeMinidump(nsIFile** aDump, uint32_t* aSequence); - virtual void OnChannelClose() = 0; virtual void OnChannelError() = 0; virtual void ProcessingError(Result aError, const char* aMsgName) {} virtual void OnChannelConnected(int32_t peer_pid) {} bool Open(mozilla::ipc::Transport* aTransport, base::ProcessId aOtherPid, MessageLoop* aThread = nullptr, diff --git a/toolkit/xre/nsEmbedFunctions.cpp b/toolkit/xre/nsEmbedFunctions.cpp --- a/toolkit/xre/nsEmbedFunctions.cpp +++ b/toolkit/xre/nsEmbedFunctions.cpp @@ -265,26 +265,16 @@ XRE_SetProcessType(const char* aProcessT ++i) { if (!strcmp(kGeckoProcessTypeString[i], aProcessTypeString)) { sChildProcessType = static_cast(i); return; } } } -// FIXME/bug 539522: this out-of-place function is stuck here because -// IPDL wants access to this crashreporter interface, and -// crashreporter is built in such a way to make that awkward -bool -XRE_TakeMinidumpForChild(uint32_t aChildPid, nsIFile** aDump, - uint32_t* aSequence) -{ - return CrashReporter::TakeMinidumpForChild(aChildPid, aDump, aSequence); -} - bool #if defined(XP_WIN) XRE_SetRemoteExceptionHandler(const char* aPipe /*= 0*/, uintptr_t aCrashTimeAnnotationFile) #else XRE_SetRemoteExceptionHandler(const char* aPipe /*= 0*/) #endif { diff --git a/xpcom/build/nsXULAppAPI.h b/xpcom/build/nsXULAppAPI.h --- a/xpcom/build/nsXULAppAPI.h +++ b/xpcom/build/nsXULAppAPI.h @@ -389,21 +389,16 @@ XRE_API(const char*, #if defined(MOZ_WIDGET_ANDROID) XRE_API(void, XRE_SetAndroidChildFds, (JNIEnv* env, int crashFd, int ipcFd, int crashAnnotationFd)) #endif // defined(MOZ_WIDGET_ANDROID) XRE_API(void, XRE_SetProcessType, (const char* aProcessTypeString)) -// Used in the "master" parent process hosting the crash server -XRE_API(bool, - XRE_TakeMinidumpForChild, (uint32_t aChildPid, nsIFile** aDump, - uint32_t* aSequence)) - // Used in child processes. #if defined(XP_WIN) // Uses uintptr_t, even though it's really a HANDLE, because including // here caused compilation issues. XRE_API(bool, XRE_SetRemoteExceptionHandler, (const char* aPipe, uintptr_t aCrashTimeAnnotationFile)) #else