Re: nsIURI object creation failed from standard URL
neel5481 <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.xpfe |
|---|---|
| Message-ID | <[email protected]> |
This is the nsIProtocolHandler custom NewURI method implemetation.
We have CustomnsIProtocolHandler which derived from nsIProtocolHandler.
class CustomnsIProtocolHandler : public nsIProtocolHandler
we have override the method NewURI() and above code is under NewURI() method
NS_IMETHODIMP CustomnsIProtocolHandler::NewURI(const nsACString &aSpec,
const char *aOriginCharset, nsIURI *aBaseURI, nsIURI **_retval)
{
ns_smartptr<nsIStandardURL>
standard_url(nsCreateInstance("@mozilla.org/network/standard-url;1"));
standard_url->Init(nsIStandardURL::URLTYPE_STANDARD, 80, aSpec,
aOriginCharset, aBaseURI);
ns_smartptr<nsIURI> result(standard_url); <---------- This result is
giving us NULL.
if (result)
{
*_retval = result;
NS_ADDREF(*_retval);
}
return NS_OK;
}
Please let me know for more information.
Thanks in Advance
--
View this message in context: http://mozilla.6506.n7.nabble.com/nsIURI-object-creation-failed-from-standard-URL-tp284859p285181.html
Sent from the Mozilla - XPFE mailing list archive at Nabble.com.