nsIURI object creation failed from standard URL

[email protected]
Newsgroups gmane.comp.mozilla.devel.xpfe
Message-ID <[email protected]>
Hi,

While creating the nsIURI object from standard_url it is giving the NULL object.

nsProtocolHandler class and NewURI() method we are accessing the standard_url and nsIURI object as below.

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);

*_retval = result;
NS_ADDREF(*_retval);

return NS_OK;


While creating the nsIURI object from standard_url ( ns_smartptr<nsIURI> result(standard_url); )  result is coming NULL (0x00000000).

Is there any reason ? why it is coming NULL ? we have use different contract ID ?

We have followed the below link

https://bugzilla.mozilla.org/show_bug.cgi?id=296798

Is it related to that ? Can anyone tell me what are the changes required to make it work ?

Thanks in Advance.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.