Ed Burns wrote:
I'm trying to convert my embedding app that relies on mozilla
1.7.7. being installed to rely instead on Firefox 1.5.0.1 being
installed.
The app worked fine under Mozilla 1.7.7, but is now failing under Firefox.
I'm calling
NS_InitEmbedding(binDir, nsnull);
Where binDir is
D:\Projects\mozilla\MOZILLA_NIH\FIREFOX_1_5_0_1\mozilla\dist\bin.
In nsAppStartupNotifier::Observe(), when it's going through the
categories of startup listeners, it fails when it gets to the one with
contractId: service,@mozill.org/extensions/manager;1
This gives me the following error on the console:
************************************************************
* Call to xpconnect wrapped JSObject produced this error: *
[Exception... "'[JavaScript Error: "Components.classes['@mozilla.org/xre/app-info;1'] has no properties" {file:
"file:///D:/Projects/mozilla/MOZILLA_NIH/FIREFOX_1_5_0_1/mozilla/dist/bin/components/nsExtensionManager.js" line: 2177}]'
when calling method: [nsIFactory::createInstance]" nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)"
location: "<unknown>" data: yes]
************************************************************
WARNING: Cannot create startup observer :
service,@mozilla.org/extensions/manager;1, file
d:/Projects/mozilla/MOZILLA_NIH/FIREFOX_1_5_0_1/mozilla/embedding/components/appstartup/src/nsAppStartupNotifier.cpp,
line 112
It then continues through the iteration and fails again on contractId:
service,@mozilla.org/updates/update-service, with a similar console
message.
The remaining categories seem to pass.
1) These errors shouldn't be affecting your app at all
2) They are caused, as it says, by the component not having access to the
component that implements nsIXULAppInfo (and nsIXULRuntime). This component
is made available during Firefox startup and is therefore (correctly)
invisible during embedding.
3) are you using a dynamic build of Firefox? If you're using a static build
all the gecko components are going to be unavailable. Since the official
Firefox releases are going to be useless, you might as well use the official
XULRunner embedding solution for which binaries are available. XULRunner
also provides a stable exported API XRE_InitEmbedding to replace the
statically linked NS_InitEmbedding function.
--BDS
_______________________________________________
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding