When I start my system I get the following error: WARNING: Error parsing GRE default preferences. Is this an old-style embedding a pp?: file d:/xulrunner-9.0.source/mozilla-release/modules/libpref/src/ Preference s.cpp, line 1063 ###!!! ASSERTION: This is not supposed to fail!: 'Error', file d:/ xulrunner-9.0. source/mozilla-release/js/src/xpconnect/src/nsXPConnect.cpp, line 983
The actual error occurs inside nsXPConnect.FindInfo when the program invokes nsIInterfaceInfoSuperManager.HasAdditionalManagers. Evidentally the result is false and this causes the Assertion to fail in nsXPConnect. I've built firefox source several times (xulrunner-9.0) but might be doing something wrong. I'm not entirely sure what I might be doing wrong, it may be related to not calling XPCOMGlueStartup. I stole the code from winEmbed but have problems with it, namely that XPCOMGlueEnablePreload and/or XPCOMGlueStartup are undefined symbols. I discovered this is largely because nsXPCOMGlue.h only defines them if XPCOM_GLUE is defined. However even if I define this flag (the tutorials I've read say not to) the system is still unable to locate the functions. nsresult rv; //char * path = "D:\\Orpheus\\orpheus\\bin"; // Sophisticated command-line parsing in action char *szFirstURL = "http://www.mozilla.org/projects/embedding/"; int argn; /*for (argn = 1; argn < argc; argn++) { szFirstURL = argv[argn]; }*/ strncpy(gFirstURL, szFirstURL, sizeof(gFirstURL) - 1); ghInstanceApp = GetModuleHandle(NULL); // Initialize global strings TCHAR szTitle[MAX_LOADSTRING]; LoadString(ghInstanceApp, IDS_APP_TITLE, szTitle, MAX_LOADSTRING); MyRegisterClass(ghInstanceApp); char path[_MAX_PATH]; GetModuleFileName(ghInstanceApp, path, sizeof(path)); char* lastslash = ns_strrpbrk(path, "/\\"); if (!lastslash) return 7; strcpy(lastslash, "\\xpcom.dll"); //rv = XPCOMGlueStartup(path); //if (NS_FAILED(rv)) // return 3; strcpy(lastslash, "\\xul.dll"); HINSTANCE xulModule = LoadLibraryEx(path, NULL, 0); if (!xulModule) return 4; nsCOMPtr<nsILocalFile> xuldir; rv = NS_NewNativeLocalFile(nsCString(path), PR_FALSE, getter_AddRefs(xuldir)); //if (NS_FAILED(rv)) //return 6; //*lastslash = '\0'; nsCOMPtr<nsILocalFile> appdir; rv = NS_NewNativeLocalFile(nsCString(path), PR_FALSE, getter_AddRefs(appdir)); XRE_InitEmbedding2(xuldir, appdir, nsnull); InitializeWindowCreator(); // Open the initial browser window OpenWebPage("www.facebook.com"); This is my command for compiling it. I can't get it to find XPCOMGlueStartup. I'm not sure if this is what causes the Assertion to fail but I think it likely. cl -D "XP_WIN" -Zi -I $XULRUNNER_SDK/include -I $XULRUNNER_SDK/ include/mozilla *.cpp $XULRUNNER_SDK/lib/xpcomglue_s.lib $XULRUNNER_SDK/lib/xpcom.lib $XULRUNNER_SDK/lib/mozalloc.lib $XULRUNNER_SDK/lib/nspr4.lib $XULRUNNER_SDK/lib/xul.lib user32.lib - FI "xpcom-config.h" I'd be grateful for any insight into better approaches in building the embedding system. _______________________________________________ dev-embedding mailing list dev-embedding@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-embedding