From 6d342dbab95e68dd10974e5b71767dfefb0df906 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Tue, 14 Jan 2020 13:23:39 +0100 Subject: 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. --- xpcom/glue/nsCRTGlue.cpp | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'xpcom/glue/nsCRTGlue.cpp') diff --git a/xpcom/glue/nsCRTGlue.cpp b/xpcom/glue/nsCRTGlue.cpp index 7a9f6db03..03c77da2b 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) -- cgit v1.2.3