> "Dorian B." <[EMAIL PROTECTED]> a écrit :
>
> The profile service is not builded if you use --enable-single-profile, and
> only really needed if you need to store multiple profiles.

Great.
but there are a lot of applications in Mozilla source tree using quite similar 
code like below

    nsCOMPtr<nsIProfile> profileService =
             do_GetService(NS_PROFILE_CONTRACTID, &rv);
    if (NS_FAILED(rv)) return rv;  // DD -> This is where you get
                                                   // DD -> 
NS_ERROR_FACTORY_NOT_REGISTERED
                                                  //  DD -> and no code 
executed below

    PRInt32 profileCount;
    rv = profileService->GetProfileCount(&profileCount);
    if (NS_FAILED(rv)) return rv;
    if (profileCount == 0)
    {
        // Make a new default profile


and guess how it works?
Right, it contantly FAILS :)

Why?
because no profile manager factory is available in most cases now (thanks to 
-single-profile)
and therefore corresponding applications will never "Make a new default 
profile" as stated in the comment.

In particular mfcembed and other embed application are crashing now when 
accessed to SSL sites just because of this breakage.
They have no profile or have no clear way on to create it and nss fails to work 
for them.
Any solution? :)


-dmitry.


----- Original Message ----- 
From: "Dorian B." <[EMAIL PROTECTED]>
Newsgroups: mozilla.dev.embedding
Sent: Wednesday, August 16, 2006 3:40 PM
Subject: Re: Embedded Gecko and Advanced Profiles Usage Question


>
> "anton kostov" <[EMAIL PROTECTED]> a écrit :
>
> > I am building Gecko embedded application and need to make research on how
> > to
> > manipulate and use Profiles.
> > However i am experiencing the following problem while trying to get
> > reference to the Profile Service:
> > NS_ERROR_FACTORY_NOT_REGISTERED
>
> The profile service is not builded if you use --enable-single-profile, and
> only really needed if you need to store multiple profiles.
>
> > the code is:
> >
> > NS_InitEmbedding(nsnull, nsnull);
> >
> > I don't know whether this is relevant but :
> > - I managed to instantiate nsProfileDirServiceProvider , and linked
> > with profdirserviceprovidersa_s.lib
>
> Yep, this is what you have to do when using single profile. But in that case
> the second parameter of NS_InitEmbedding should not be null, since you have
> to pass a dirserviceprovider which will give the profile location.
>
> > (Win32) - BUT NOT with profdirserviceprovider_s.lib (??)
> > - tried to link with profile_s.lib library but that doesn't seem to change
> > anything.
>
> Those libs are not for you to use.
>
>


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

Reply via email to