DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Mercurial (56e7b9127e89)

VCS Links

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
#include "nsIURIMutator.h"
#include "nsIURI.h"
#include "nsComponentManagerUtils.h"

static nsresult
GetURIMutator(nsIURI* aURI, nsIURIMutator** aMutator)
{
    if (NS_WARN_IF(!aURI)) {
        return NS_ERROR_INVALID_ARG;
    }
    return aURI->Mutate(aMutator);
}

NS_MutateURI::NS_MutateURI(nsIURI* aURI)
{
  mStatus = GetURIMutator(aURI, getter_AddRefs(mMutator));
  NS_ENSURE_SUCCESS_VOID(mStatus);
}

NS_MutateURI::NS_MutateURI(const char * aContractID)
  : mStatus(NS_ERROR_NOT_INITIALIZED)
{
  mMutator = do_CreateInstance(aContractID, &mStatus);
  MOZ_ASSERT(NS_SUCCEEDED(mStatus), "Called with wrong aContractID");
}