Closed Bug 524778 Opened 16 years ago Closed 16 years ago

XRE_GetProcessType returns 0 (default) for child processes during leak log initialization

Categories

(Core :: IPC, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jgriffin, Unassigned)

References

Details

I'm trying to get leak logging to handle child processes better, and was planning on using XRE_GetProcessType() inside the log file init function to determine whether it was being called by the default process or by a child process. However, this function always returns 0 (default), when called from InitLog() in nsTraceRefcntImpl.cpp. This happens because sChildProcessType is not set inside XRE_InitChildProcess() until later in the function, so InitLog() gets called while sChildProcessType is still GeckProcessType_Default. Moving the line: sChildProcessType = aProcess; to the top of XRE_InitChildProcess() fixes this problem, but I am uncertain if it might cause others.
That sounds fine to me.
This is fixed by bug 519570.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.