Back to index

lightning-sunbird  0.9+nobinonly
Functions
nsLoadSaveContentSink.cpp File Reference
#include "nscore.h"
#include "nsLoadSaveContentSink.h"

Go to the source code of this file.

Functions

nsresult NS_NewLoadSaveContentSink (nsILoadSaveContentSink **aResult, nsIXMLContentSink *aBaseSink)
 The nsIXMLContentSink passed to this method must also implement nsIExpatSink.

Function Documentation

The nsIXMLContentSink passed to this method must also implement nsIExpatSink.

Definition at line 43 of file nsLoadSaveContentSink.cpp.

{
  NS_PRECONDITION(aResult, "Null out ptr?  Who do you think you are, flouting XPCOM contract?");
  NS_ENSURE_ARG_POINTER(aBaseSink);
  nsLoadSaveContentSink* it;
  NS_NEWXPCOM(it, nsLoadSaveContentSink);
  if (!it) {
    return NS_ERROR_OUT_OF_MEMORY;
  }
  
  nsresult rv = it->Init(aBaseSink);
  if (NS_FAILED(rv)) {
    delete it;
    return rv;
  }

  return CallQueryInterface(it, aResult);  
}

Here is the call graph for this function: