diff --git a/xpcom/base/nsQueryObject.h b/xpcom/base/nsQueryObject.h index ce4f632ac69e..7cfbe954ce97 100644 --- a/xpcom/base/nsQueryObject.h +++ b/xpcom/base/nsQueryObject.h @@ -61,12 +61,12 @@ inline nsQueryObject do_QueryObject(T* aRawPtr) { } template -inline nsQueryObject do_QueryObject(nsCOMPtr& aRawPtr) { +inline nsQueryObject do_QueryObject(const nsCOMPtr& aRawPtr) { return nsQueryObject(aRawPtr); } template -inline nsQueryObject do_QueryObject(RefPtr& aRawPtr) { +inline nsQueryObject do_QueryObject(const RefPtr& aRawPtr) { return nsQueryObject(aRawPtr); } @@ -77,13 +77,13 @@ inline nsQueryObjectWithError do_QueryObject(T* aRawPtr, } template -inline nsQueryObjectWithError do_QueryObject(nsCOMPtr& aRawPtr, +inline nsQueryObjectWithError do_QueryObject(const nsCOMPtr& aRawPtr, nsresult* aErrorPtr) { return nsQueryObjectWithError(aRawPtr, aErrorPtr); } template -inline nsQueryObjectWithError do_QueryObject(RefPtr& aRawPtr, +inline nsQueryObjectWithError do_QueryObject(const RefPtr& aRawPtr, nsresult* aErrorPtr) { return nsQueryObjectWithError(aRawPtr, aErrorPtr); }