Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[linux-distros-dev] Re: SWT: NS_InitEmbedding vs. NS_InitXPCOM

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thomas Fitzsimmons wrote:

>> That sounds like you do not have a profile directory. You must have a
>> profile directory in order for certain things to work correctly (which
>> probably includes passwordmanager and SSL).
> 
> Yes, exactly.  Andrew is trying to figure out how to set the profile
> directory.

There are many ways to set the profile directory, you could use the
dirserviceprovider goop, but you probably don't want to do that in this
case. The simplest way to select a profile from embedded code is to:

1) Install a directory service provider that responds to "ProfD"
2) Send appropriate observer-service notifications to notify gecko that
there is a profile. In this case, you can see what the Firefox startup code
does here:

http://lxr.mozilla.org/mozilla/source/toolkit/xre/nsXREDirProvider.cpp#666

3) when it is time to shutdown, you do this process in reverse: you fire
profile-shutdown notifications
http://lxr.mozilla.org/mozilla/source/toolkit/xre/nsXREDirProvider.cpp#709

4) and then uninstall your directory provider

> The problem is that the Eclipse code to set the profile directory works
> on the static Firefox build, but doesn't link against Fedora's dynamic
> Firefox builds.  The JNI doesn't link in Fedora because the required
> objects (from profile/{src,build,dirserviceprovider,pref-migrator}) are
> not built, specifically because MOZ_SINGLE_PROFILE is defined in the
> Fedora build.  I presume MOZ_SINGLE_PROFILE is not defined in the static
> build.

That is not true, MOZ_SINGLE_PROFILE is defined in all toolkit-based
applications (which includes Firefox), no matter whether they are built
statically or dynamically.

> Chris, do you know why that's the case?  It is possible to build FC-6
> Firefox with MOZ_SINGLE_PROFILE undefined (from configure.in it looks
> like this would require also providing xpcom-obsolete)?

No, this is not possible.

- --BDS
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFG/YiSSwGp5sTYNkRAkEpAKC/FiluacY+v6RbV13tAVZ6cqg3FACfb4Ws
+VFfflfiGyr3BywNqYTU5Bk=
=uaJe
-----END PGP SIGNATURE-----


Back to the top