nsPrefMigrationFactory::QueryInterface(REFNSIID aIID, void** aInstancePtr) { if (aInstancePtr == NULL) { return NS_ERROR_NULL_POINTER; }   *aInstancePtr = NULL;  if ( aIID.Equals(kISupportsIID) ) { *aInstancePtr = (void*) this; } else if ( aIID.Equals(kIFactoryIID) ) { *aInstancePtr = (void*) this; }  if (aInstancePtr == NULL) { return NS_ERROR_NO_INTERFACE; }  AddRef(); return NS_OK; }
NS_IMPL_ISUPPORTS(nsPrefMigrationModule, NS_GET_IID(nsIModule))
nsPrefMigrationFactory::QueryInterface(REFNSIID aIID, void** aInstancePtr){  if (aInstancePtr == NULL)  {    return NS_ERROR_NULL_POINTER;  }  // Always NULL result, in case of failure  *aInstancePtr = NULL;  if ( aIID.Equals(kISupportsIID) )  {    *aInstancePtr = (void*) this;  }  else if ( aIID.Equals(kIFactoryIID) )  {    *aInstancePtr = (void*) this;  }  if (aInstancePtr == NULL)  {    return NS_ERROR_NO_INTERFACE;  }  AddRef();  return NS_OK;}