Back to index

lightning-sunbird  0.9+nobinonly
Functions
nsSVGDocument.cpp File Reference
#include "nsSVGDocument.h"
#include "nsContentUtils.h"
#include "nsString.h"
#include "nsLiteralString.h"
#include "nsIDOMSVGSVGElement.h"

Go to the source code of this file.

Functions

nsresult NS_NewSVGDocument (nsIDocument **aInstancePtrResult)

Function Documentation

nsresult NS_NewSVGDocument ( nsIDocument **  aInstancePtrResult)

Definition at line 131 of file nsSVGDocument.cpp.

{
  *aInstancePtrResult = nsnull;
  nsSVGDocument* doc = new nsSVGDocument();

  if (!doc)
    return NS_ERROR_OUT_OF_MEMORY;

  NS_ADDREF(doc);
  nsresult rv = doc->Init();

  if (NS_FAILED(rv)) {
    NS_RELEASE(doc);
    return rv;
  }

  *aInstancePtrResult = doc;
  return rv;
}

Here is the call graph for this function: