return walker->QueryInterface(NS_GET_IID(nsIDOMTreeWalker), (void**) aInstancePtrResult);
return CallQueryInterface(walker, aInstancePtrResult);
NS_NewTreeWalker(nsIDOMNode *aRoot,                 PRUint32 aWhatToShow,                 nsIDOMNodeFilter *aFilter,                 PRBool aEntityReferenceExpansion,                 nsIDOMTreeWalker **aInstancePtrResult) {    NS_ENSURE_ARG_POINTER(aInstancePtrResult);    NS_ENSURE_TRUE(aRoot, NS_ERROR_DOM_NOT_SUPPORTED_ERR);    nsTreeWalker* walker = new nsTreeWalker(aRoot,                                            aWhatToShow,                                            aFilter,                                            aEntityReferenceExpansion);    NS_ENSURE_TRUE(walker, NS_ERROR_OUT_OF_MEMORY);        return walker->QueryInterface(NS_GET_IID(nsIDOMTreeWalker),                                  (void**) aInstancePtrResult);}