On Sep 6, 6:35 pm, Benjamin Smedberg <[email protected]> wrote:
> On 9/6/2011 9:03 AM, Babele Dunnit wrote:
>
>
>
>
>
>
>
> > hi there,
>
> > is there any reason for which a line like
>
> > nsCOMPtr<nsIXULAppInfo>  appInfo = do_GetService("@mozilla.org/xre/app-
> > info;1");
>
> > should fail giving back a null ptr? everything works, GRE is correctly
> > loaded etc.
>
> > BTW:
>
> >   nsCOMPtr<nsIXULRuntime>  runtime(do_GetService("@mozilla.org/xre/app-
> > info;1"));
>
> > works, the "runtime" ptr is not null...
>
> Are you using the same version of the platform and the SDK? This smells
> to me like a header mismatch where you're using a different version (and
> IID) for nsIXULAppInfo than the platform code which implements it.
>
> --BDs

Hi Benjamin,

I double-checked it: good trial but no, that was not the answer. In
fact, I am going to tell you something that will make you think I am a
complete rookie: that line of code does not work, at least between
Gecko 1.9.0.9 and 6.0.2.

I recompiled and run our codebase (under Windows) with several gecko
releases (also gecko 2.0 and 5.0), I put an assertion like assert(!
appInfo) and it never failed...

but anyway, what I was trying to do was to get the version of the GRE
actually used, like when you call XULRunner without any parameter, and
digging in the code on MXR I see that you read it out from
platform.ini... so I am gonna do the same. :)

Thanks!

_______________________________________________
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding

Reply via email to