simplify setting up a tmpdir for crashreporting
Categories
(Core :: IPC, enhancement)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox66 | --- | fixed |
People
(Reporter: froydnj, Assigned: froydnj)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
|
4.28 KB,
patch
|
Alex_Gaynor
:
review+
|
Details | Diff | Splinter Review |
|
5.12 KB,
patch
|
gsvelto
:
review+
|
Details | Diff | Splinter Review |
We have this code for setting up a temporary directory for crash reporting:
(Unix) https://searchfox.org/mozilla-central/rev/5053031ba7621fa8f63f42de4c204ab3561e4e59/ipc/glue/GeckoChildProcessHost.cpp#730-743
(Windows) https://searchfox.org/mozilla-central/rev/5053031ba7621fa8f63f42de4c204ab3561e4e59/ipc/glue/GeckoChildProcessHost.cpp#1015-1028
and code for receiving it:
Notice the duplicated conditions, and the failure to correctly check for the VR process in all cases. (And the flat-out duplicated logic in the Unix and Windows cases, sigh.)
We should simplify this, whether with a GECKO_PROCESS_TYPE parameter that indicates whether the process needs a temporary directory for crash reporting (the content process doesn't because...sandboxing hasn't locked it down yet?) or some other scheme that I haven't thought of.
| Assignee | ||
Updated•6 years ago
|
Comment 1•6 years ago
|
||
Hmm, I suspect I was the last person to touch how content processes do crash reporting, but I don't remember there being a directory.
A year and change ago, the content process used to create a new file on crash, write some stuff to it, and then send the filename up to the parent. I changed it so that at process startup, the child inherits an fd from the parent, and writes to that. None of the code I wrote was specific to content processes, but it's possible the methods I was changing were already only for content processes. The goal of all of this was to remove the need for content processes to ever need to create a new file, which was achieved (at least on macOS).
What are other processes needing a whole directory for? Seems like there's room for rationalizing content processes vs. everything else?
| Assignee | ||
Comment 2•6 years ago
|
||
Actually, you know what? We setup crashReportTmpDir:
and then we never use it again. So we should just remove all this code as dead, then?
| Assignee | ||
Comment 3•6 years ago
|
||
Ah, it looks like Alex removed the use of crashReportTmpDir in bug 1407693:
https://hg.mozilla.org/mozilla-central/rev/bcc0a91dd43f#l13.112
So yeah, I think this code is dead, and we can ditch all of it. Alex, do you feel comfortable reviewing that code deletion?
| Assignee | ||
Comment 5•6 years ago
|
||
| Assignee | ||
Comment 6•6 years ago
|
||
Updated•6 years ago
|
Comment 7•6 years ago
|
||
Comment on attachment 9035688 [details] [diff] [review]
part 2 - remove GetChildProcessTmpDir
Thanks for cleaning this up!
Comment 9•6 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/4ef4c81995f6
https://hg.mozilla.org/mozilla-central/rev/20e70e44d305
Updated•6 years ago
|
Description
•