NS_PRECONDITION(nsnull != aInstancePtrResult, "null ptr"); if (nsnull == aInstancePtrResult) { return NS_ERROR_NULL_POINTER; } URLImpl* it = new URLImpl(aSpec);
URLImpl* it = new URLImpl(aSpec, container);
NS_NET nsresult NS_NewURL(nsIURL** aInstancePtrResult,                          const nsString& aSpec){  NS_PRECONDITION(nsnull != aInstancePtrResult, "null ptr");  if (nsnull == aInstancePtrResult) {    return NS_ERROR_NULL_POINTER;  }  URLImpl* it = new URLImpl(aSpec);  if (nsnull == it) {    return NS_ERROR_OUT_OF_MEMORY;  }  return it->QueryInterface(kURLIID, (void **) aInstancePtrResult);}