I'm pretty sure this is a problem for m.d.platform, setting followup-to etc.
If in this case "em" does not exist, it sounds like you didn't get the add-ons
manager to work. From what you're saying, if you bypass XRE_main, are you fully
initializing XPCOM and so on? That'd be my first guess, others will have better
info. The em should exist quite irrespective of what add-ons you have available
as such (that is, whether or not em is null does not depend on whether you have
add-ons installed). Other than that, I remember that there are some finnicky
(locale?) things your app needs to do to get the EM to work, but (a) I don't
think that was related to the service, moreso to the actual UI etc., and (b)
pretty sure Fennec gets that right, so it shouldn't be an issue.
~ Gijs
Thanks for the quick response. I think un-initialized or poorly
initialized em is the problem here because I don't think em exists
unless I initialize it. So I will trace the problem on this trail.
Thanks!
Atul.
As rightly pointed out by Gijs, XPCOM initialization was the problem.
I followed similar sequence of initialization as in nsAppRunner.cpp
and now I am getting the list of extensions available.
Thanks Gijs for your help!
Atul.