Quantcast

nsIURI object creation failed from standard URL

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

nsIURI object creation failed from standard URL

neel5481
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.
Loading...