void RegisterDTD(nsIDTD* aDTD){ if(aDTD) { NS_ADDREF(aDTD); CDTDFinder theFinder(aDTD); if(!mDTDDeque.FirstThat(theFinder)) { nsIDTD* theDTD; aDTD->CreateNewInstance(&theDTD); mDTDDeque.Push(theDTD); } NS_RELEASE(aDTD);
nsresult RegisterDTD(nsIDTD* aDTD) { NS_ENSURE_ARG_POINTER(aDTD); nsCOMPtr<nsIDTD> dtd(aDTD); CDTDFinder theFinder(dtd); if (!mDTDDeque.FirstThat(theFinder)) { nsIDTD* theDTD; nsresult rv = dtd->CreateNewInstance(&theDTD); NS_ENSURE_SUCCESS(rv, rv); mDTDDeque.Push(theDTD);
  void RegisterDTD(nsIDTD* aDTD){    if(aDTD) {      NS_ADDREF(aDTD);      CDTDFinder theFinder(aDTD);      if(!mDTDDeque.FirstThat(theFinder)) {        nsIDTD* theDTD;        aDTD->CreateNewInstance(&theDTD);        mDTDDeque.Push(theDTD);      }      NS_RELEASE(aDTD);    }  }