зеркало из https://github.com/mozilla/pjs.git
fixing accidental behavior change from my checkin for bug #85271. This patch is r=dbaron. Restores the correct return value for the function (|NS_OK| when no converter is found).
This commit is contained in:
Родитель
49fdc4996c
Коммит
6ffb79541e
|
@ -329,7 +329,7 @@ nsMimeHtmlDisplayEmitter::StartAttachment(const char *name, const char *contentT
|
|||
// we emit it...
|
||||
nsXPIDLString unicodeHeaderValue;
|
||||
|
||||
rv = NS_ERROR_FAILURE;
|
||||
rv = NS_ERROR_FAILURE; // use failure to mean that we couldn't decode
|
||||
if (mUnicodeConverter)
|
||||
rv = mUnicodeConverter->DecodeMimeHeader(name,
|
||||
getter_Copies(unicodeHeaderValue));
|
||||
|
@ -337,6 +337,10 @@ nsMimeHtmlDisplayEmitter::StartAttachment(const char *name, const char *contentT
|
|||
if (NS_FAILED(rv))
|
||||
{
|
||||
unicodeHeaderValue.Adopt(ToNewUnicode(nsDependentCString(name)));
|
||||
|
||||
// but it's not really a failure if we didn't have a converter in the first place
|
||||
if ( !mUnicodeConverter )
|
||||
rv = NS_OK;
|
||||
}
|
||||
|
||||
headerSink->HandleAttachment(contentType, url /* was escapedUrl */, unicodeHeaderValue, uriString, aNotDownloaded);
|
||||
|
|
Загрузка…
Ссылка в новой задаче