Hi,

I am trying to embed the gecko engine with in the Plugin area, for
loading specific files with a XUL chrome in it. The init method,
NS_InitEmbedding(nsnull, nsnull)
is failing because of multiple main thread initialization. That is
because the
NS_InitEmbedding in plugin will try to set the main thread again (after
the browser sets it). The code can be seen at in nsThread.cpp :

NS_COM nsresult
nsIThread::SetMainThread()
{
    // strictly speaking, it could be set twice. but practically
speaking,
    // it's almost certainly an error if it is
    if (gMainThread != 0) {
        NS_ERROR("Setting main thread twice?");
        return NS_ERROR_FAILURE;
    }
    return GetCurrent(&gMainThread);
}

I believe, the if condition need to be removed. It should be allowed to
set multiple
times.

Any comments are graetly appriciated.

Thanks,
Ram.


Reply via email to