bug 417669 - crashreporter displays details: firefox. r=dcamp

This commit is contained in:
ted.mielczarek@gmail.com 2008-02-21 16:00:14 -08:00
Родитель 3d98abd717
Коммит 57478c35de
1 изменённых файлов: 20 добавлений и 6 удалений

Просмотреть файл

@ -384,12 +384,26 @@ void RewriteStrings(StringTable& queryParameters)
vendor.c_str()); vendor.c_str());
gStrings[ST_CRASHREPORTERTITLE] = buf; gStrings[ST_CRASHREPORTERTITLE] = buf;
// Leave a format specifier for UIError to fill in
UI_SNPRINTF(buf, sizeof(buf), string str = gStrings[ST_CRASHREPORTERPRODUCTERROR];
gStrings[ST_CRASHREPORTERPRODUCTERROR].c_str(), // Only do the replacement here if the string has two
product.c_str(), // format specifiers to start. Otherwise
"%s"); // we assume it has the product name hardcoded.
gStrings[ST_CRASHREPORTERERROR] = buf; string::size_type pos = str.find("%s");
if (pos != string::npos)
pos = str.find("%s", pos+2);
if (pos != string::npos) {
// Leave a format specifier for UIError to fill in
UI_SNPRINTF(buf, sizeof(buf),
gStrings[ST_CRASHREPORTERPRODUCTERROR].c_str(),
product.c_str(),
"%s");
gStrings[ST_CRASHREPORTERERROR] = buf;
}
else {
// product name is hardcoded
gStrings[ST_CRASHREPORTERERROR] = str;
}
UI_SNPRINTF(buf, sizeof(buf), UI_SNPRINTF(buf, sizeof(buf),
gStrings[ST_CRASHREPORTERDESCRIPTION].c_str(), gStrings[ST_CRASHREPORTERDESCRIPTION].c_str(),