From:  "AndrĂ© Pedralho" <apedralho@gmail.com>
Date:  28 Feb 2006 01:33:09 Hong Kong Time
Newsgroup:  news.mozilla.org/netscape.public.mozilla.gtk
Subject:  

Can't get the service of a changed component

NNTP-Posting-Host:  207.126.111.202

Hi all,
I am trying to partially solve the bug https://bugzilla.mozilla.org/show_bug.cgi?id=121139 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?

NS_IMETHODIMP
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