Hi. you may be tired , busy or what ever but please take the time to answer
!

If you take a close look at modules/libpref/src/prefapi (line 430) wou will
find this code :

    if (!gMochaTaskState)
        gMochaTaskState = PREF_GetJSRuntime();

    if (!gMochaContext)
    {
        gMochaContext = JS_NewContext(gMochaTaskState, 8192);  /* ???? What
size? */

The call to PREF_GetJSRuntime(); is failing due to nsIJSRuntimeService not
been registered  . Here is the PREF_GetJSRuntime function.

extern "C" JSRuntime* PREF_GetJSRuntime()
{
    nsresult rv;

    NS_WITH_SERVICE(nsIJSRuntimeService, rtsvc,
"@mozilla.org/js/xpc/RuntimeService;1", &rv);
    if (NS_FAILED(rv)) return nsnull;

    JSRuntime* rt;
    rv = rtsvc->GetRuntime(&rt);
    if (NS_FAILED(rv)) return nsnull;

    return rt;
}

Can you tell me where does this service gets registered so i can do the call
before it hits this function ? No need to say that i did grep on the source
i cannot figure it myself.



Reply via email to