From:  "AndrĂ© Pedralho" <>
Date:  28 Feb 2006 01:33:09 Hong Kong Time

Can't get the service of a changed component


Hi all,
I am trying to partially solve the bug and I'm in trouble. If you see the in bug page there are more explanations about my work on this. In summa, I'am trying to comment out all the autocomplete stuff from the global history. It seems to be easy, but after do the required changes, the docshell cannot get the global history service. It tries to set the global history usage to true, but the method below fails when tries to get the global history service. I mean, the do_GetService(NS_GLOBALHISTORY2_CONTRACTID, &rv) sets the rv to false. What else do I have to do for getting it work?

nsDocShell::SetUseGlobalHistory(PRBool aUseGlobalHistory)
    nsresult rv;

    if (!aUseGlobalHistory) {
        mGlobalHistory = nsnull;
        return NS_OK;

    if (mGlobalHistory) {
        return NS_OK;

    mGlobalHistory = do_GetService(NS_GLOBALHISTORY2_CONTRACTID, &rv);
    return rv;

Thanks in advance.

André Pedralho
Bachelor in Computer Science
Instituto Nokia de Tecnologia