I am trying to embed Mozilla 1.9.2.12 into an MFC application. With the release target everything is working fine, but the thing is that I want to use the release binaries (with debugging info) for the both the debug as well. For debug I am building the release using the following .mozconfig file
MOZ_MAPINFO=1 export MOZ_DEBUG_SYMBOLS=1 ac_add_options --enable-application=browser ac_add_options --disable-debug ac_add_options --disable-optimize ac_add_options --disable-tests ac_add_options --enable-debugger-info-modules=yes ac_add_options --enable-jemalloc I can successfully build the debug target of my app using the release binaries built this way. But when I load a page, obtain corresponding nsIDocument object and try to call a method like GetScriptGlobalObject(), the call instead goes to the method declared immediately below it i.e SetScriptGlobalObject() and the app crashes inside this method. From what I can understand, the method pointers in the vptr table seem to be messed up due to some reason and incorrect methods are getting called. Does anyone have any info on what the reason might be for this and how to fix it? Second Issue: I am building a debug version of the same mozilla code base and linking with the debug target of my app. In this case too the app builds fine, but when I try to execute a JS function from the HTML document using the JS_CallFunctionName JSAPI, I am getting an assert cx == topJSContext, "wrong context on XPCJSContextStack!" from xpcquickstubs.cpp:xpc_qsAssertContextOK() Call stack for the same > xul.dll!xpc_qsAssertContextOK(JSContext * cx=0x0507c258) Line 1158 + > 0x23 bytes C++ xul.dll!nsIDOMNode_GetNodeType(JSContext * cx=0x0507c258, JSObject * obj=0x04d72820, int id=62338580, int * vp=0x0012ec9c) Line 4059 + 0x9 bytes C++ js3250.dll!js_GetSprop(JSContext * cx=0x0507c258, JSScopeProperty * sprop=0x03a42ff8, JSObject * obj=0x04d72820, int * vp=0x0012ec9c) Line 613 + 0x41 bytes C++ js3250.dll!js_NativeGet(JSContext * cx=0x0507c258, JSObject * obj=0x04d72820, JSObject * pobj=0x04d72760, JSScopeProperty * sprop=0x03a42ff8, int * vp=0x0012ec9c) Line 4117 + 0x15 bytes C++ js3250.dll!js_GetPropertyHelper(JSContext * cx=0x0507c258, JSObject * obj=0x04d72820, int id=62338580, int cacheResult=1, int * vp=0x0012ec9c) Line 4275 + 0x19 bytes C++ js3250.dll!js_Interpret(JSContext * cx=0x0507c258) Line 1520 + 0x23 bytes C++ js3250.dll!js_Invoke(JSContext * cx=0x0507c258, unsigned int argc=0, int * vp=0x06492c30, unsigned int flags=0) Line 1368 + 0x9 bytes C++ js3250.dll!js_InternalInvoke(JSContext * cx=0x0507c258, JSObject * obj=0x03b71760, int fval=85997536, unsigned int flags=0, unsigned int argc=0, int * argv=0x04fadb78, int * rval=0x0012f048) Line 1423 + 0x15 bytes C++ js3250.dll!JS_CallFunctionName(JSContext * cx=0x0507c258, JSObject * obj=0x03b71760, const char * name=0x063ec960, unsigned int argc=0, int * argv=0x04fadb78, int * rval=0x0012f048) Line 5102 + 0x7a bytes C++ If any one can shed some light on this,please do so. Thanks, Darth Coder _______________________________________________ dev-embedding mailing list dev-embedding@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-embedding