зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1518922
- part 1 - remove dead code for extra crashreporting directory; r=Alex_Gaynor
The command-line parameter used by nsEmbedFunctions.cpp is turned into an nsIFile, and then said nsIFile is never used. Its last use was deleted in bug 1407693, where we reworked how extra annotations were done.
This commit is contained in:
Родитель
ebb609373d
Коммит
fcefa80c7c
|
@ -730,21 +730,6 @@ bool GeckoChildProcessHost::PerformAsyncLaunch(
|
||||||
// Add the application directory path (-appdir path)
|
// Add the application directory path (-appdir path)
|
||||||
AddAppDirToCommandLine(childArgv);
|
AddAppDirToCommandLine(childArgv);
|
||||||
|
|
||||||
// Tmp dir that the GPU or RDD process should use for crash reports.
|
|
||||||
// This arg is always populated (but possibly with an empty value) for
|
|
||||||
// a GPU or RDD child process.
|
|
||||||
if (mProcessType == GeckoProcessType_GPU ||
|
|
||||||
mProcessType == GeckoProcessType_RDD ||
|
|
||||||
mProcessType == GeckoProcessType_VR) {
|
|
||||||
nsCOMPtr<nsIFile> file;
|
|
||||||
CrashReporter::GetChildProcessTmpDir(getter_AddRefs(file));
|
|
||||||
nsAutoCString path;
|
|
||||||
if (file) {
|
|
||||||
file->GetNativePath(path);
|
|
||||||
}
|
|
||||||
childArgv.push_back(path.get());
|
|
||||||
}
|
|
||||||
|
|
||||||
childArgv.push_back(pidstring);
|
childArgv.push_back(pidstring);
|
||||||
|
|
||||||
if (!CrashReporter::IsDummy()) {
|
if (!CrashReporter::IsDummy()) {
|
||||||
|
@ -1015,21 +1000,6 @@ bool GeckoChildProcessHost::PerformAsyncLaunch(
|
||||||
// Win app model id
|
// Win app model id
|
||||||
cmdLine.AppendLooseValue(mGroupId.get());
|
cmdLine.AppendLooseValue(mGroupId.get());
|
||||||
|
|
||||||
// Tmp dir that the GPU or RDD process should use for crash reports.
|
|
||||||
// This arg is always populated (but possibly with an empty value) for
|
|
||||||
// a GPU or RDD child process.
|
|
||||||
if (mProcessType == GeckoProcessType_GPU ||
|
|
||||||
mProcessType == GeckoProcessType_RDD) {
|
|
||||||
nsCOMPtr<nsIFile> file;
|
|
||||||
CrashReporter::GetChildProcessTmpDir(getter_AddRefs(file));
|
|
||||||
nsString path;
|
|
||||||
if (file) {
|
|
||||||
MOZ_ALWAYS_SUCCEEDS(file->GetPath(path));
|
|
||||||
}
|
|
||||||
std::wstring wpath(path.get());
|
|
||||||
cmdLine.AppendLooseValue(wpath);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Process id
|
// Process id
|
||||||
cmdLine.AppendLooseValue(UTF8ToWide(pidstring));
|
cmdLine.AppendLooseValue(UTF8ToWide(pidstring));
|
||||||
|
|
||||||
|
|
|
@ -594,22 +594,6 @@ nsresult XRE_InitChildProcess(int aArgc, char* aArgv[],
|
||||||
base::ProcessId parentPID = strtol(parentPIDString, &end, 10);
|
base::ProcessId parentPID = strtol(parentPIDString, &end, 10);
|
||||||
MOZ_ASSERT(!*end, "invalid parent PID");
|
MOZ_ASSERT(!*end, "invalid parent PID");
|
||||||
|
|
||||||
nsCOMPtr<nsIFile> crashReportTmpDir;
|
|
||||||
if (XRE_GetProcessType() == GeckoProcessType_GPU ||
|
|
||||||
XRE_GetProcessType() == GeckoProcessType_RDD) {
|
|
||||||
aArgc--;
|
|
||||||
if (strlen(aArgv[aArgc])) { // if it's empty, ignore it
|
|
||||||
nsresult rv =
|
|
||||||
XRE_GetFileFromPath(aArgv[aArgc], getter_AddRefs(crashReportTmpDir));
|
|
||||||
if (NS_FAILED(rv)) {
|
|
||||||
// If we don't have a valid tmp dir we can probably still run ok, but
|
|
||||||
// crash report .extra files might not get picked up by the parent
|
|
||||||
// process. Debug-assert because this shouldn't happen in practice.
|
|
||||||
MOZ_ASSERT(false, "GPU process started without valid tmp dir!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// While replaying, use the parent PID that existed while recording.
|
// While replaying, use the parent PID that existed while recording.
|
||||||
parentPID = recordreplay::RecordReplayValue(parentPID);
|
parentPID = recordreplay::RecordReplayValue(parentPID);
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче