VirtualBox

Ignore:
Timestamp:
Feb 24, 2022 10:45:13 AM (3 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
150136
Message:

xpcom18a4/ipcDConnectService.cpp: Assert when returning NS_ERROR_INVALID_POINTER. bugref:9898

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libs/xpcom18a4/ipc/ipcd/extensions/dconnect/src/ipcDConnectService.cpp

    r86401 r93910  
    374374    case nsXPTType::T_IID:
    375375      {
    376         if (v.val.p)
    377           writer.PutBytes(v.val.p, sizeof(nsID));
    378         else
    379           return NS_ERROR_INVALID_POINTER;
     376        AssertReturn(v.val.p, NS_ERROR_INVALID_POINTER);
     377        writer.PutBytes(v.val.p, sizeof(nsID));
    380378      }
    381379      break;
     
    18831881NS_IMETHODIMP ExceptionStub::GetMessage(char **aMessage)
    18841882{
    1885   if (!aMessage)
    1886     return NS_ERROR_INVALID_POINTER;
     1883  AssertReturn(aMessage, NS_ERROR_INVALID_POINTER);
    18871884  *aMessage = ToNewCString(mMessage);
    18881885  return NS_OK;
     
    18921889NS_IMETHODIMP ExceptionStub::GetResult(nsresult *aResult)
    18931890{
    1894   if (!aResult)
    1895     return NS_ERROR_INVALID_POINTER;
     1891  AssertReturn(aResult, NS_ERROR_INVALID_POINTER);
    18961892  *aResult = mResult;
    18971893  return NS_OK;
     
    19011897NS_IMETHODIMP ExceptionStub::GetName(char **aName)
    19021898{
    1903   if (!aName)
    1904     return NS_ERROR_INVALID_POINTER;
     1899  AssertReturn(aName, NS_ERROR_INVALID_POINTER);
    19051900  *aName = ToNewCString(mName);
    19061901  return NS_OK;
     
    19101905NS_IMETHODIMP ExceptionStub::GetFilename(char **aFilename)
    19111906{
    1912   if (!aFilename)
    1913     return NS_ERROR_INVALID_POINTER;
     1907  AssertReturn(aFilename, NS_ERROR_INVALID_POINTER);
    19141908  *aFilename = ToNewCString(mFilename);
    19151909  return NS_OK;
     
    19191913NS_IMETHODIMP ExceptionStub::GetLineNumber(PRUint32 *aLineNumber)
    19201914{
    1921   if (!aLineNumber)
    1922     return NS_ERROR_INVALID_POINTER;
     1915  AssertReturn(aLineNumber, NS_ERROR_INVALID_POINTER);
    19231916  *aLineNumber = mLineNumber;
    19241917  return NS_OK;
     
    19281921NS_IMETHODIMP ExceptionStub::GetColumnNumber(PRUint32 *aColumnNumber)
    19291922{
    1930   if (!aColumnNumber)
    1931     return NS_ERROR_INVALID_POINTER;
     1923  AssertReturn(aColumnNumber, NS_ERROR_INVALID_POINTER);
    19321924  *aColumnNumber = mColumnNumber;
    19331925  return NS_OK;
     
    25902582        rv = SerializeParam(writer, type, aParams[i]);
    25912583
    2592       if (NS_FAILED(rv))
    2593         break;
     2584      AssertMsgBreak(NS_SUCCEEDED(rv), ("i=%d rv=%#x\n", i, rv));
    25942585    }
    25952586    else if ((paramInfo.IsOut() || paramInfo.IsRetval()) && !aParams[i].val.p)
     
    25972588      // report error early if NULL pointer is passed as an output parameter
    25982589      rv = NS_ERROR_NULL_POINTER;
     2590      AssertMsgFailedBreak(("i=%d IsOut=%d IsRetval=%d NS_ERROR_NULL_POINTER\n", i, paramInfo.IsOut(), paramInfo.IsRetval()));
    25992591      break;
    26002592    }
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette