зеркало из https://github.com/mozilla/pjs.git
fix for bug 78654 - netwerk must not print to console in opt builds.r=dougt, sr==darin.
This commit is contained in:
Родитель
5c23cb9a99
Коммит
db0af255c2
|
@ -580,7 +580,9 @@ nsFileTransport::Run(void)
|
|||
|
||||
#ifdef TIMING
|
||||
PRIntervalTime now = PR_IntervalNow();
|
||||
#ifdef DEBUG
|
||||
printf("nsFileTransport: latency=%u ticks\n", now - mStartTime);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if (mRunState == SUSPENDED && NS_FAILED(mCancelStatus))
|
||||
|
|
|
@ -446,7 +446,9 @@ spawnHelperProcess (const char *name)
|
|||
|
||||
if (pipe(fds))
|
||||
{
|
||||
#ifdef DNS_DEBUG
|
||||
fprintf (stderr, "Can't make pipe\n");
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -455,7 +457,9 @@ spawnHelperProcess (const char *name)
|
|||
switch (forked = fork())
|
||||
{
|
||||
case -1:
|
||||
#ifdef DNS_DEBUG
|
||||
fprintf (stderr, "Can't fork\n");
|
||||
#endif
|
||||
removeFromDnsQueue (obj);
|
||||
break;
|
||||
|
||||
|
@ -588,8 +592,12 @@ int main (int argc, char **argv)
|
|||
obj->accept_fd = accept_fd;
|
||||
char hId[5];
|
||||
*(int *)&hId[0] = (int) obj->id;
|
||||
if (!obj)
|
||||
if (!obj) {
|
||||
#ifdef DNS_DEBUG
|
||||
fprintf (stderr, "spawn Error\n");
|
||||
#endif
|
||||
;
|
||||
}
|
||||
else
|
||||
{
|
||||
send (obj->accept_fd, hId, sizeof (int), 0);
|
||||
|
|
|
@ -177,11 +177,15 @@ static void dns_socks_kludge(void);
|
|||
/* Way kludgy debugging/logging interface, since gdb's support
|
||||
for debugging fork'ed processes is pathetic.
|
||||
*/
|
||||
#ifdef DEBUG
|
||||
#define LOG_PROCn(PROC,PREFIX,BUF,SUFFIX,QL)
|
||||
#else
|
||||
#define LOG_PROCn(PROC,PREFIX,BUF,SUFFIX,QL) do{\
|
||||
fprintf(stderr, \
|
||||
"\t" PROC " (%lu): " PREFIX ": (ql=%ld) %s" SUFFIX, \
|
||||
((unsigned long) getpid()), QL, BUF); \
|
||||
} while(0)
|
||||
#endif
|
||||
|
||||
#ifdef PROC3_DEBUG_PRINT
|
||||
# define LOG_PROC3(PREFIX,BUF,SUFFIX) LOG_PROCn("proc3",PREFIX,BUF,SUFFIX,0L)
|
||||
|
@ -770,6 +774,7 @@ dns_driver_init(int argc, char **argv, int in_fd, int out_fd)
|
|||
|
||||
execvp(argv[0], new_argv);
|
||||
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr,
|
||||
"\nMozilla: execvp(\"%s\") failed!\n"
|
||||
"\tThis means that we were unable to fork() the dns-helper process,\n"
|
||||
|
@ -778,6 +783,7 @@ dns_driver_init(int argc, char **argv, int in_fd, int out_fd)
|
|||
argv[0]);
|
||||
exit(0);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif /* !CHANGING_ARGV_WORKS */
|
||||
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Загрузка…
Ссылка в новой задаче