inst2 = new nsXPCOMStringDetector(ZHTW_DETECTOR_NUM_VERIFIERS - 2, gZhTwVerifierSet);
inst2 = new nsXPCOMStringDetector(ZHTW_DETECTOR_NUM_VERIFIERS - 3, gZhTwVerifierSet);
NS_IMETHODIMP nsXPCOMDetectorFactory::CreateInstance(    nsISupports* aDelegate, const nsIID &aIID, void** aResult){  if(NULL == aResult)        return NS_ERROR_NULL_POINTER;  if(NULL != aDelegate)        return NS_ERROR_NO_AGGREGATION;  *aResult = NULL;  nsXPCOMDetector *inst1 = nsnull;  nsXPCOMStringDetector *inst2 = nsnull;   if (mCID.Equals(kJAPSMDetectorCID)) {      inst1 = new nsXPCOMDetector(JA_DETECTOR_NUM_VERIFIERS, gJaVerifierSet);  } else if (mCID.Equals(kKOPSMDetectorCID)) {      inst1 = new nsXPCOMDetector(KO_DETECTOR_NUM_VERIFIERS, gKoVerifierSet);  } else if (mCID.Equals(kZHCNPSMDetectorCID)) {      inst1 = new nsXPCOMDetector(ZHCN_DETECTOR_NUM_VERIFIERS, gZhCnVerifierSet);  } else if (mCID.Equals(kZHTWPSMDetectorCID)) {      inst1 = new nsXPCOMDetector(ZHTW_DETECTOR_NUM_VERIFIERS, gZhTwVerifierSet);  } else if (mCID.Equals(kZHPSMDetectorCID)) {      inst1 = new nsXPCOMDetector(ZH_DETECTOR_NUM_VERIFIERS, gZhVerifierSet);  } else if (mCID.Equals(kCJKPSMDetectorCID)) {      inst1 = new nsXPCOMDetector(CJK_DETECTOR_NUM_VERIFIERS, gCJKVerifierSet);  } else if (mCID.Equals(kJAStringPSMDetectorCID)) {      inst2 = new nsXPCOMStringDetector(JA_DETECTOR_NUM_VERIFIERS - 2, gJaVerifierSet);  } else if (mCID.Equals(kKOStringPSMDetectorCID)) {      inst2 = new nsXPCOMStringDetector(KO_DETECTOR_NUM_VERIFIERS - 2, gKoVerifierSet);  } else if (mCID.Equals(kZHCNStringPSMDetectorCID)) {      inst2 = new nsXPCOMStringDetector(ZHCN_DETECTOR_NUM_VERIFIERS - 2, gZhCnVerifierSet);  } else if (mCID.Equals(kZHTWStringPSMDetectorCID)) {      inst2 = new nsXPCOMStringDetector(ZHTW_DETECTOR_NUM_VERIFIERS - 2, gZhTwVerifierSet);  } else if (mCID.Equals(kZHStringPSMDetectorCID)) {      inst2 = new nsXPCOMStringDetector(ZH_DETECTOR_NUM_VERIFIERS - 2, gZhVerifierSet);  } else if (mCID.Equals(kCJKStringPSMDetectorCID)) {      inst2 = new nsXPCOMStringDetector(CJK_DETECTOR_NUM_VERIFIERS - 2, gCJKVerifierSet);  }  if((NULL == inst1) && (NULL == inst2)) {    return NS_ERROR_OUT_OF_MEMORY;  }  nsresult res = NS_OK;  if(inst1)     res =inst1->QueryInterface(aIID, aResult);  else     res =inst2->QueryInterface(aIID, aResult);  if(NS_FAILED(res)) {     if(inst1)       delete inst1;     if(inst2)       delete inst2;  }  return res;}