зеркало из https://github.com/mozilla/pjs.git
bug 245772 : Remove some useless null checks. r+sr=peterv
This commit is contained in:
Родитель
bd7318913f
Коммит
1441e83fbb
|
@ -564,8 +564,6 @@ NS_IMETHODIMP
|
|||
nsIDOMElement * *aReturnValue)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aEncoding);
|
||||
NS_ENSURE_ARG_POINTER(&aNamespaceURI);
|
||||
NS_ENSURE_ARG_POINTER(&aName);
|
||||
NS_ENSURE_ARG_POINTER(aDestination);
|
||||
NS_ENSURE_ARG_POINTER(aReturnValue);
|
||||
*aReturnValue = nsnull;
|
||||
|
@ -710,8 +708,6 @@ NS_IMETHODIMP
|
|||
nsIDOMElement * *aReturnValue)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aEncoding);
|
||||
NS_ENSURE_ARG_POINTER(&aNamespaceURI);
|
||||
NS_ENSURE_ARG_POINTER(&aName);
|
||||
NS_ENSURE_ARG_POINTER(aDestination);
|
||||
NS_ENSURE_ARG_POINTER(aReturnValue);
|
||||
*aReturnValue = nsnull;
|
||||
|
@ -928,8 +924,6 @@ NS_IMETHODIMP
|
|||
nsIDOMElement * *aReturnValue)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aEncoding);
|
||||
NS_ENSURE_ARG_POINTER(&aNamespaceURI);
|
||||
NS_ENSURE_ARG_POINTER(&aName);
|
||||
NS_ENSURE_ARG_POINTER(aDestination);
|
||||
NS_ENSURE_ARG_POINTER(aReturnValue);
|
||||
*aReturnValue = nsnull;
|
||||
|
@ -982,8 +976,6 @@ NS_IMETHODIMP
|
|||
nsIDOMElement * *aReturnValue)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aEncoding);
|
||||
NS_ENSURE_ARG_POINTER(&aNamespaceURI);
|
||||
NS_ENSURE_ARG_POINTER(&aName);
|
||||
NS_ENSURE_ARG_POINTER(aDestination);
|
||||
NS_ENSURE_ARG_POINTER(aReturnValue);
|
||||
*aReturnValue = nsnull;
|
||||
|
@ -1328,8 +1320,6 @@ NS_IMETHODIMP
|
|||
nsIDOMElement * *aReturnValue)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aEncoding);
|
||||
NS_ENSURE_ARG_POINTER(&aNamespaceURI);
|
||||
NS_ENSURE_ARG_POINTER(&aName);
|
||||
NS_ENSURE_ARG_POINTER(aDestination);
|
||||
NS_ENSURE_ARG_POINTER(aReturnValue);
|
||||
*aReturnValue = nsnull;
|
||||
|
@ -1447,8 +1437,6 @@ NS_IMETHODIMP
|
|||
nsIDOMElement * *aReturnValue)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aEncoding);
|
||||
NS_ENSURE_ARG_POINTER(&aNamespaceURI);
|
||||
NS_ENSURE_ARG_POINTER(&aName);
|
||||
NS_ENSURE_ARG_POINTER(aDestination);
|
||||
NS_ENSURE_ARG_POINTER(aReturnValue);
|
||||
*aReturnValue = nsnull;
|
||||
|
@ -1475,8 +1463,6 @@ NS_IMETHODIMP
|
|||
nsIDOMElement * *aReturnValue)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aEncoding);
|
||||
NS_ENSURE_ARG_POINTER(&aNamespaceURI);
|
||||
NS_ENSURE_ARG_POINTER(&aName);
|
||||
NS_ENSURE_ARG_POINTER(aDestination);
|
||||
NS_ENSURE_ARG_POINTER(aReturnValue);
|
||||
*aReturnValue = nsnull;
|
||||
|
@ -1503,8 +1489,6 @@ NS_IMETHODIMP
|
|||
nsIDOMElement * *aReturnValue)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aEncoding);
|
||||
NS_ENSURE_ARG_POINTER(&aNamespaceURI);
|
||||
NS_ENSURE_ARG_POINTER(&aName);
|
||||
NS_ENSURE_ARG_POINTER(aDestination);
|
||||
NS_ENSURE_ARG_POINTER(aReturnValue);
|
||||
*aReturnValue = nsnull;
|
||||
|
@ -1537,8 +1521,6 @@ NS_IMETHODIMP
|
|||
nsIDOMElement * *aReturnValue)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aEncoding);
|
||||
NS_ENSURE_ARG_POINTER(&aNamespaceURI);
|
||||
NS_ENSURE_ARG_POINTER(&aName);
|
||||
NS_ENSURE_ARG_POINTER(aDestination);
|
||||
NS_ENSURE_ARG_POINTER(aReturnValue);
|
||||
*aReturnValue = nsnull;
|
||||
|
@ -1571,8 +1553,6 @@ NS_IMETHODIMP
|
|||
nsIDOMElement * *aReturnValue)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aEncoding);
|
||||
NS_ENSURE_ARG_POINTER(&aNamespaceURI);
|
||||
NS_ENSURE_ARG_POINTER(&aName);
|
||||
NS_ENSURE_ARG_POINTER(aDestination);
|
||||
NS_ENSURE_ARG_POINTER(aReturnValue);
|
||||
*aReturnValue = nsnull;
|
||||
|
@ -1605,8 +1585,6 @@ NS_IMETHODIMP
|
|||
nsIDOMElement * *aReturnValue)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aEncoding);
|
||||
NS_ENSURE_ARG_POINTER(&aNamespaceURI);
|
||||
NS_ENSURE_ARG_POINTER(&aName);
|
||||
NS_ENSURE_ARG_POINTER(aDestination);
|
||||
NS_ENSURE_ARG_POINTER(aReturnValue);
|
||||
*aReturnValue = nsnull;
|
||||
|
@ -1639,8 +1617,6 @@ NS_IMETHODIMP
|
|||
nsIDOMElement * *aReturnValue)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aEncoding);
|
||||
NS_ENSURE_ARG_POINTER(&aNamespaceURI);
|
||||
NS_ENSURE_ARG_POINTER(&aName);
|
||||
NS_ENSURE_ARG_POINTER(aDestination);
|
||||
NS_ENSURE_ARG_POINTER(aReturnValue);
|
||||
*aReturnValue = nsnull;
|
||||
|
@ -1673,8 +1649,6 @@ NS_IMETHODIMP
|
|||
nsIDOMElement * *aReturnValue)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aEncoding);
|
||||
NS_ENSURE_ARG_POINTER(&aNamespaceURI);
|
||||
NS_ENSURE_ARG_POINTER(&aName);
|
||||
NS_ENSURE_ARG_POINTER(aDestination);
|
||||
NS_ENSURE_ARG_POINTER(aReturnValue);
|
||||
*aReturnValue = nsnull;
|
||||
|
@ -1707,8 +1681,6 @@ NS_IMETHODIMP
|
|||
nsIDOMElement * *aReturnValue)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aEncoding);
|
||||
NS_ENSURE_ARG_POINTER(&aNamespaceURI);
|
||||
NS_ENSURE_ARG_POINTER(&aName);
|
||||
NS_ENSURE_ARG_POINTER(aDestination);
|
||||
NS_ENSURE_ARG_POINTER(aReturnValue);
|
||||
*aReturnValue = nsnull;
|
||||
|
@ -1741,8 +1713,6 @@ NS_IMETHODIMP
|
|||
nsIDOMElement * *aReturnValue)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aEncoding);
|
||||
NS_ENSURE_ARG_POINTER(&aNamespaceURI);
|
||||
NS_ENSURE_ARG_POINTER(&aName);
|
||||
NS_ENSURE_ARG_POINTER(aDestination);
|
||||
NS_ENSURE_ARG_POINTER(aReturnValue);
|
||||
*aReturnValue = nsnull;
|
||||
|
@ -1775,8 +1745,6 @@ NS_IMETHODIMP
|
|||
nsIDOMElement * *aReturnValue)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aEncoding);
|
||||
NS_ENSURE_ARG_POINTER(&aNamespaceURI);
|
||||
NS_ENSURE_ARG_POINTER(&aName);
|
||||
NS_ENSURE_ARG_POINTER(aDestination);
|
||||
NS_ENSURE_ARG_POINTER(aReturnValue);
|
||||
*aReturnValue = nsnull;
|
||||
|
@ -1809,8 +1777,6 @@ NS_IMETHODIMP
|
|||
nsIDOMElement * *aReturnValue)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aEncoding);
|
||||
NS_ENSURE_ARG_POINTER(&aNamespaceURI);
|
||||
NS_ENSURE_ARG_POINTER(&aName);
|
||||
NS_ENSURE_ARG_POINTER(aDestination);
|
||||
NS_ENSURE_ARG_POINTER(aReturnValue);
|
||||
*aReturnValue = nsnull;
|
||||
|
|
|
@ -68,7 +68,6 @@ NS_IMETHODIMP nsSOAPBlock::Init(nsISOAPAttachments * aAttachments,
|
|||
/* attribute AString namespaceURI; */
|
||||
NS_IMETHODIMP nsSOAPBlock::GetNamespaceURI(nsAString & aNamespaceURI)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(&aNamespaceURI);
|
||||
if (mElement) {
|
||||
if (mEncoding) {
|
||||
nsAutoString temp;
|
||||
|
@ -86,7 +85,6 @@ NS_IMETHODIMP nsSOAPBlock::GetNamespaceURI(nsAString & aNamespaceURI)
|
|||
|
||||
NS_IMETHODIMP nsSOAPBlock::SetNamespaceURI(const nsAString & aNamespaceURI)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(&aNamespaceURI);
|
||||
nsresult rc = SetElement(nsnull);
|
||||
if (NS_FAILED(rc))
|
||||
return rc;
|
||||
|
@ -97,7 +95,6 @@ NS_IMETHODIMP nsSOAPBlock::SetNamespaceURI(const nsAString & aNamespaceURI)
|
|||
/* attribute AString name; */
|
||||
NS_IMETHODIMP nsSOAPBlock::GetName(nsAString & aName)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(&aName);
|
||||
if (mElement) {
|
||||
return mElement->GetLocalName(aName);
|
||||
} else {
|
||||
|
@ -108,7 +105,6 @@ NS_IMETHODIMP nsSOAPBlock::GetName(nsAString & aName)
|
|||
|
||||
NS_IMETHODIMP nsSOAPBlock::SetName(const nsAString & aName)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(&aName);
|
||||
nsresult rc = SetElement(nsnull);
|
||||
if (NS_FAILED(rc))
|
||||
return rc;
|
||||
|
|
|
@ -82,7 +82,6 @@ NS_IMETHODIMP nsSOAPCall::SetVerifySourceHeader(PRBool aVerifySourceHeader)
|
|||
/* attribute DOMString transportURI; */
|
||||
NS_IMETHODIMP nsSOAPCall::GetTransportURI(nsAString & aTransportURI)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(&aTransportURI);
|
||||
aTransportURI.Assign(mTransportURI);
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -214,7 +214,6 @@ nsresult
|
|||
/* readonly attribute AString styleURI; */
|
||||
NS_IMETHODIMP nsSOAPEncoding::GetStyleURI(nsAString & aStyleURI)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(&aStyleURI);
|
||||
aStyleURI.Assign(mStyleURI);
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -387,8 +386,6 @@ nsSOAPEncoding::MapSchemaURI(const nsAString & aExternalURI,
|
|||
PRBool aOutput,
|
||||
PRBool *_retval)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(&aExternalURI);
|
||||
NS_ENSURE_ARG_POINTER(&aInternalURI);
|
||||
if (aExternalURI.IsEmpty() || aInternalURI.IsEmpty()) // Permit no empty URIs.
|
||||
return SOAP_EXCEPTION(NS_ERROR_ILLEGAL_VALUE,"SOAP_SCHEMA_URI_MAPPING", "No schema URI mapping possible of empty strings.");
|
||||
nsStringKey externalKey(aExternalURI);
|
||||
|
@ -429,7 +426,6 @@ nsSOAPEncoding::MapSchemaURI(const nsAString & aExternalURI,
|
|||
/* boolean unmapSchemaURI (in AString aExternalURI); */
|
||||
NS_IMETHODIMP nsSOAPEncoding::UnmapSchemaURI(const nsAString & aExternalURI, PRBool *_retval)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(&aExternalURI);
|
||||
nsStringKey externalKey(aExternalURI);
|
||||
nsCOMPtr<nsIVariant> internal = dont_AddRef(NS_STATIC_CAST(nsIVariant*,mMappedExternal.Get(&externalKey)));
|
||||
if (internal) {
|
||||
|
@ -453,8 +449,6 @@ NS_IMETHODIMP nsSOAPEncoding::UnmapSchemaURI(const nsAString & aExternalURI, PRB
|
|||
/* AString getInternalSchemaURI (in AString aExternalURI); */
|
||||
NS_IMETHODIMP nsSOAPEncoding::GetInternalSchemaURI(const nsAString & aExternalURI, nsAString & _retval)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(&aExternalURI);
|
||||
NS_ENSURE_ARG_POINTER(&_retval);
|
||||
if (mMappedExternal.Count()) {
|
||||
nsStringKey externalKey(aExternalURI);
|
||||
nsCOMPtr<nsIVariant> internal = dont_AddRef(NS_STATIC_CAST(nsIVariant*,mMappedExternal.Get(&externalKey)));
|
||||
|
@ -472,8 +466,6 @@ NS_IMETHODIMP nsSOAPEncoding::GetInternalSchemaURI(const nsAString & aExternalUR
|
|||
/* AString getExternalSchemaURI (in AString aInternalURI); */
|
||||
NS_IMETHODIMP nsSOAPEncoding::GetExternalSchemaURI(const nsAString & aInternalURI, nsAString & _retval)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(&aInternalURI);
|
||||
NS_ENSURE_ARG_POINTER(&_retval);
|
||||
if (mMappedInternal.Count()) {
|
||||
nsStringKey internalKey(aInternalURI);
|
||||
nsCOMPtr<nsIVariant> external = dont_AddRef(NS_STATIC_CAST(nsIVariant*,mMappedInternal.Get(&internalKey)));
|
||||
|
|
|
@ -91,7 +91,6 @@ NS_IMETHODIMP nsSOAPFault::GetElement(nsIDOMElement * *aElement)
|
|||
/* readonly attribute wstring faultCode; */
|
||||
NS_IMETHODIMP nsSOAPFault::GetFaultCode(nsAString & aFaultCode)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(&aFaultCode);
|
||||
if (!mFaultElement)
|
||||
return NS_ERROR_ILLEGAL_VALUE;
|
||||
aFaultCode.Truncate();
|
||||
|
@ -113,7 +112,6 @@ NS_IMETHODIMP nsSOAPFault::GetFaultCode(nsAString & aFaultCode)
|
|||
/* readonly attribute wstring faultNamespaceURI; */
|
||||
NS_IMETHODIMP nsSOAPFault::GetFaultNamespaceURI(nsAString & aNamespaceURI)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(&aNamespaceURI);
|
||||
if (!mFaultElement)
|
||||
return NS_ERROR_ILLEGAL_VALUE;
|
||||
aNamespaceURI.Truncate();
|
||||
|
@ -135,7 +133,6 @@ NS_IMETHODIMP nsSOAPFault::GetFaultNamespaceURI(nsAString & aNamespaceURI)
|
|||
/* readonly attribute wstring faultString; */
|
||||
NS_IMETHODIMP nsSOAPFault::GetFaultString(nsAString & aFaultString)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(&aFaultString);
|
||||
if (!mFaultElement)
|
||||
return NS_ERROR_ILLEGAL_VALUE;
|
||||
|
||||
|
@ -156,7 +153,6 @@ NS_IMETHODIMP nsSOAPFault::GetFaultString(nsAString & aFaultString)
|
|||
/* readonly attribute wstring faultActor; */
|
||||
NS_IMETHODIMP nsSOAPFault::GetFaultActor(nsAString & aFaultActor)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(&aFaultActor);
|
||||
if (!mFaultElement)
|
||||
return NS_ERROR_ILLEGAL_VALUE;
|
||||
|
||||
|
|
|
@ -63,7 +63,6 @@ NS_IMPL_CI_INTERFACE_GETTER2(nsSOAPHeaderBlock, nsISOAPBlock,
|
|||
/* attribute AString actorURI; */
|
||||
NS_IMETHODIMP nsSOAPHeaderBlock::GetActorURI(nsAString & aActorURI)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(&aActorURI);
|
||||
if (mElement) {
|
||||
if (mVersion == nsISOAPMessage::VERSION_UNKNOWN)
|
||||
return SOAP_EXCEPTION(NS_ERROR_NOT_AVAILABLE,"SOAP_HEADER_INIT", "Header has not been properly initialized.");
|
||||
|
@ -89,7 +88,6 @@ NS_IMETHODIMP nsSOAPHeaderBlock::SetActorURI(const nsAString & aActorURI)
|
|||
NS_IMETHODIMP nsSOAPHeaderBlock::GetMustUnderstand(PRBool *
|
||||
aMustUnderstand)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(&aMustUnderstand);
|
||||
if (mElement) {
|
||||
if (mVersion == nsISOAPMessage::VERSION_UNKNOWN)
|
||||
return SOAP_EXCEPTION(NS_ERROR_NOT_AVAILABLE,"SOAP_HEADER_INIT", "Header has not been properly initialized.");
|
||||
|
|
|
@ -210,14 +210,12 @@ NS_IMETHODIMP nsSOAPMessage::GetBody(nsIDOMElement * *aBody)
|
|||
/* attribute DOMString actionURI; */
|
||||
NS_IMETHODIMP nsSOAPMessage::GetActionURI(nsAString & aActionURI)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(&aActionURI);
|
||||
aActionURI.Assign(mActionURI);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsSOAPMessage::SetActionURI(const nsAString & aActionURI)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(&aActionURI);
|
||||
mActionURI.Assign(aActionURI);
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -225,7 +223,6 @@ NS_IMETHODIMP nsSOAPMessage::SetActionURI(const nsAString & aActionURI)
|
|||
/* readonly attribute AString methodName; */
|
||||
NS_IMETHODIMP nsSOAPMessage::GetMethodName(nsAString & aMethodName)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(&aMethodName);
|
||||
nsCOMPtr<nsIDOMElement> body;
|
||||
GetBody(getter_AddRefs(body));
|
||||
if (body) {
|
||||
|
@ -244,7 +241,6 @@ NS_IMETHODIMP nsSOAPMessage::GetMethodName(nsAString & aMethodName)
|
|||
NS_IMETHODIMP nsSOAPMessage::
|
||||
GetTargetObjectURI(nsAString & aTargetObjectURI)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(&aTargetObjectURI);
|
||||
nsCOMPtr<nsIDOMElement> body;
|
||||
GetBody(getter_AddRefs(body));
|
||||
if (body) {
|
||||
|
@ -283,8 +279,6 @@ NS_IMETHODIMP
|
|||
&realEmptySOAPDocStr1, &realEmptySOAPDocStr2
|
||||
};
|
||||
|
||||
NS_ENSURE_ARG_POINTER(&aMethodName);
|
||||
NS_ENSURE_ARG_POINTER(&aTargetObjectURI);
|
||||
if (aVersion != nsISOAPMessage::VERSION_1_1
|
||||
&& aVersion != nsISOAPMessage::VERSION_1_2)
|
||||
return SOAP_EXCEPTION(NS_ERROR_ILLEGAL_VALUE,"SOAP_BAD_VALUE","Cannot encode message blocks without a valid SOAP version specified.");
|
||||
|
|
Загрузка…
Ссылка в новой задаче