1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #include "nsIInterfaceRequestor.h"
8 #include "nsIInterfaceRequestorUtils.h"
10 nsresult
nsGetInterface::operator()(const nsIID
& aIID
,
11 void** aInstancePtr
) const {
15 nsCOMPtr
<nsIInterfaceRequestor
> factoryPtr
= do_QueryInterface(mSource
);
17 status
= factoryPtr
->GetInterface(aIID
, aInstancePtr
);
19 status
= NS_ERROR_NO_INTERFACE
;
22 status
= NS_ERROR_NULL_POINTER
;
25 if (NS_FAILED(status
)) {