nsresult nsTestXPCFoo::QueryInterface(REFNSIID aIID, void** aInstancePtr)
NS_IMETHODIMP nsTestXPCFoo::QueryInterface(REFNSIID aIID, void** aInstancePtr)
nsresult nsTestXPCFoo::QueryInterface(REFNSIID aIID, void** aInstancePtr){  if (NULL == aInstancePtr) {    return NS_ERROR_NULL_POINTER;  }  *aInstancePtr = NULL;  static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);  static NS_DEFINE_IID(kClassIID, NS_ITESTXPC_FOO_IID);  static NS_DEFINE_IID(kClass2IID, NS_ITESTXPC_FOO2_IID);  static NS_DEFINE_IID(kScriptableIID, NS_IXPCSCRIPTABLE_IID);  if (aIID.Equals(kClassIID) ||       aIID.Equals(kClass2IID) ||      aIID.Equals(kISupportsIID)) {    *aInstancePtr = (void*) this;    NS_ADDREF_THIS();    return NS_OK;  }  if (aIID.Equals(kScriptableIID)) {    *aInstancePtr = (void*) new MyScriptable();    return NS_OK;  }  return NS_NOINTERFACE;}