зеркало из https://github.com/mozilla/pjs.git
Trying the safer version of the bustage fix. Last reviewed by jst, but
that version busted, I think this cannot fail.
This commit is contained in:
Родитель
0297024c3a
Коммит
08285d747a
|
@ -203,6 +203,9 @@ nsSOAPException::ToString(char **_retval)
|
|||
NS_NAMED_LITERAL_STRING(realSOAPExceptionEmpty, "");
|
||||
const nsAString & nsSOAPException::kEmpty = realSOAPExceptionEmpty;
|
||||
|
||||
static NS_NAMED_LITERAL_STRING(kFailure, "SOAP_FAILURE");
|
||||
static NS_NAMED_LITERAL_STRING(kNoDescription, "No description");
|
||||
|
||||
nsresult nsSOAPException::AddException(nsresult aStatus, const nsAString & aName,
|
||||
const nsAString & aMessage,PRBool aClear)
|
||||
{
|
||||
|
@ -217,14 +220,11 @@ nsresult nsSOAPException::AddException(nsresult aStatus, const nsAString & aName
|
|||
xs->GetCurrentException(getter_AddRefs(old));
|
||||
// Need to cast the NS_LITERAL_STRING to const nsAString& to make
|
||||
// it compile on CW on Mac.
|
||||
const nsAString& name = aName.IsEmpty() ?
|
||||
NS_STATIC_CAST(const nsAString&, NS_LITERAL_STRING("SOAP_FAILURE")) :
|
||||
aName;
|
||||
const nsAString& message = aMessage.IsEmpty() ?
|
||||
NS_STATIC_CAST(const nsAString&, NS_LITERAL_STRING("No description")) :
|
||||
aMessage;
|
||||
nsCOMPtr<nsIException> exception = new nsSOAPException(aStatus, name,
|
||||
message, old);
|
||||
// The evil ? operator caused bustage. This time, eliminate that.
|
||||
// const nsAString& name = aName.IsEmpty() ? kFailure : aName;
|
||||
// const nsAString& message = aMessage.IsEmpty() ? kNoDescription : aMessage;
|
||||
nsCOMPtr<nsIException> exception = new nsSOAPException(aStatus, aName,
|
||||
aMessage, old);
|
||||
if (exception) {
|
||||
xm->SetCurrentException(exception);
|
||||
}
|
||||
|
|
|
@ -203,6 +203,9 @@ nsSOAPException::ToString(char **_retval)
|
|||
NS_NAMED_LITERAL_STRING(realSOAPExceptionEmpty, "");
|
||||
const nsAString & nsSOAPException::kEmpty = realSOAPExceptionEmpty;
|
||||
|
||||
static NS_NAMED_LITERAL_STRING(kFailure, "SOAP_FAILURE");
|
||||
static NS_NAMED_LITERAL_STRING(kNoDescription, "No description");
|
||||
|
||||
nsresult nsSOAPException::AddException(nsresult aStatus, const nsAString & aName,
|
||||
const nsAString & aMessage,PRBool aClear)
|
||||
{
|
||||
|
@ -217,14 +220,11 @@ nsresult nsSOAPException::AddException(nsresult aStatus, const nsAString & aName
|
|||
xs->GetCurrentException(getter_AddRefs(old));
|
||||
// Need to cast the NS_LITERAL_STRING to const nsAString& to make
|
||||
// it compile on CW on Mac.
|
||||
const nsAString& name = aName.IsEmpty() ?
|
||||
NS_STATIC_CAST(const nsAString&, NS_LITERAL_STRING("SOAP_FAILURE")) :
|
||||
aName;
|
||||
const nsAString& message = aMessage.IsEmpty() ?
|
||||
NS_STATIC_CAST(const nsAString&, NS_LITERAL_STRING("No description")) :
|
||||
aMessage;
|
||||
nsCOMPtr<nsIException> exception = new nsSOAPException(aStatus, name,
|
||||
message, old);
|
||||
// The evil ? operator caused bustage. This time, eliminate that.
|
||||
// const nsAString& name = aName.IsEmpty() ? kFailure : aName;
|
||||
// const nsAString& message = aMessage.IsEmpty() ? kNoDescription : aMessage;
|
||||
nsCOMPtr<nsIException> exception = new nsSOAPException(aStatus, aName,
|
||||
aMessage, old);
|
||||
if (exception) {
|
||||
xm->SetCurrentException(exception);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче