Back to index

lightning-sunbird  0.9+nobinonly
Classes | Typedefs | Functions
nsXTFGenericElementWrapper.cpp File Reference
#include "nsCOMPtr.h"
#include "nsXTFElementWrapper.h"
#include "nsIXTFGenericElement.h"
#include "nsXTFWeakTearoff.h"
#include "nsIXTFGenericElementWrapper.h"

Go to the source code of this file.

Classes

class  nsXTFGenericElementWrapper

Typedefs

typedef nsXTFElementWrapper nsXTFGenericElementWrapperBase

Functions

nsresult NS_NewXTFGenericElementWrapper (nsIXTFGenericElement *xtfElement, nsINodeInfo *ni, nsIContent **aResult)

Typedef Documentation

Definition at line 45 of file nsXTFGenericElementWrapper.cpp.


Function Documentation

Definition at line 127 of file nsXTFGenericElementWrapper.cpp.

{
  *aResult = nsnull;
  
  if (!xtfElement) {
    NS_ERROR("can't construct an xtf wrapper without an xtf element");
    return NS_ERROR_FAILURE;
  }
  
  nsXTFGenericElementWrapper* result = new nsXTFGenericElementWrapper(ni, xtfElement);
  if (!result)
    return NS_ERROR_OUT_OF_MEMORY;

  NS_ADDREF(result);

  nsresult rv = result->Init();

  if (NS_FAILED(rv)) {
    NS_RELEASE(result);
    return rv;
  }
  
  *aResult = result;
  return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function: