summaryrefslogtreecommitdiff
path: root/xpcom/glue/nsCRTGlue.cpp
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2020-01-14 13:23:39 +0100
committerwolfbeast <mcwerewolf@wolfbeast.com>2020-01-14 13:23:39 +0100
commit6d342dbab95e68dd10974e5b71767dfefb0df906 (patch)
treedab361ea2ca9c7e32662753587c4f537890251b8 /xpcom/glue/nsCRTGlue.cpp
parent217dca872b5aef8bca06a6ae3eb274b2e2fb34f0 (diff)
downloaduxp-6d342dbab95e68dd10974e5b71767dfefb0df906.tar.gz
Issue #1319 - Remove stderr_to_file.
This local-debug function is only useful for Android to work around issues with logspewing and should never be in production builds anyway.
Diffstat (limited to 'xpcom/glue/nsCRTGlue.cpp')
-rw-r--r--xpcom/glue/nsCRTGlue.cpp24
1 files changed, 0 insertions, 24 deletions
diff --git a/xpcom/glue/nsCRTGlue.cpp b/xpcom/glue/nsCRTGlue.cpp
index 7a9f6db030..03c77da2b9 100644
--- a/xpcom/glue/nsCRTGlue.cpp
+++ b/xpcom/glue/nsCRTGlue.cpp
@@ -321,30 +321,6 @@ set_stderr_callback(StderrCallback aCallback)
sStderrCallback = aCallback;
}
-#if defined(ANDROID) && !defined(RELEASE_OR_BETA)
-static FILE* sStderrCopy = nullptr;
-
-void
-stderr_to_file(const char* aFmt, va_list aArgs)
-{
- vfprintf(sStderrCopy, aFmt, aArgs);
-}
-
-void
-copy_stderr_to_file(const char* aFile)
-{
- if (sStderrCopy) {
- return;
- }
- size_t buflen = strlen(aFile) + 16;
- char* buf = (char*)malloc(buflen);
- snprintf(buf, buflen, "%s.%u", aFile, (uint32_t)getpid());
- sStderrCopy = fopen(buf, "w");
- free(buf);
- set_stderr_callback(stderr_to_file);
-}
-#endif
-
#ifdef HAVE_VA_COPY
#define VARARGS_ASSIGN(foo, bar) VA_COPY(foo,bar)
#elif defined(HAVE_VA_LIST_AS_ARRAY)