Re: Registering components under XULRunner 24

Benjamin Smedberg <[email protected]> Thu, 13 Feb 2014 12:39:52 -0500
Newsgroups gmane.comp.mozilla.devel.embedding
Message-ID <[email protected]>
On 2/13/2014 12:31 PM, Christian Sell wrote:
> Hello,
>
> me again ;). We are embedding XULRunner in our Java application, using a thin integration layer written in C++ that provides extended functionality. We also have a XPCOM component written in Javascript, which we previously called though JavaXPCOM, and now need to call from C++. However, no matter what I do, I keep getting a NS_ERROR_FACTORY_NOT_REGISTERED when issuing the following call:
>
> nsCOMPtr<nsIRegionCapture> regionPrinter;
> retval = servMan->GetServiceByContractID("@mozilla.org/regioncapture;1", NS_GET_IID(nsIRegionCapture), getter_AddRefs(regionPrinter));
>
> I have tried adding the .js and .xpt files to the xulrunner components subdirectory (which I had to create), added chrome.manifest files pointing to the component, and even tried programmatic registration through
>
> nsIComponentRegistrar> registrar;
> retval = NS_GetComponentRegistrar(getter_AddRefs(registrar));
> retval = registrar->AutoRegister(file);

If `file` points to the .manifest file you created, then AutoRegister 
should work. Are you seeing any errors from nsIConsoleService? When we 
adopted manifests I tried to make sure that any parsing errors would 
show up in the Firefox console.

--BDS