Closed
Bug 121139
Opened 23 years ago
Closed 7 years ago
Split autocomplete out from global history
Categories
(Core Graveyard :: History: Global, defect, P3)
Tracking
(Not tracked)
RESOLVED
WORKSFORME
Future
People
(Reporter: alecf, Assigned: alecf)
Details
Attachments
(1 file)
133.99 KB,
text/x-c++src
|
Details |
Our global history implementation is becoming unweildy. At some point we need to break out the autocomplete stuff out from the rest of global history. This will probably require some special interface so that autocomplete can still get fast access to global history's database.
Assignee | ||
Updated•23 years ago
|
Status: NEW → ASSIGNED
Priority: -- → P3
Target Milestone: --- → Future
Comment 1•18 years ago
|
||
I could compile this making some changes in Makefiles and disabling the stuff in an old version of the mozilla. But I think the Global History is the same since there.
Comment 2•18 years ago
|
||
Ok! I sent an attachment with my nsGlobalHistory.cpp. I did some changes for compiling the history without the autocomplete stuff. I need to do this because I'm not enabling XUL and autocomplete depends on the XUL tree view. Unfortunately, the history constructor is not being called anymore. What do I have to do for this?
Comment 3•18 years ago
|
||
(In reply to comment #2) > Ok! I sent an attachment with my nsGlobalHistory.cpp. I did some changes for > compiling the history without the autocomplete stuff. I need to do this because > I'm not enabling XUL and autocomplete depends on the XUL tree view. > Unfortunately, the history constructor is not being called anymore. What do I > have to do for this? > I was hacking the code then I realized the problem is when the nsDocShell.cpp tries to get the history service. I don't know why but the following line sets the rv to false: mGlobalHistory = do_GetService(NS_GLOBALHISTORY2_CONTRACTID, &rv); Following the complete method SetUseGlobalHistory: 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); if (NS_SUCCEEDED(rv)) printf("SetUseGlobalHistory - mGlobalHistory = do_GetService\n"); else printf("SetUseGlobalHistory - mGlobalHistory = do_GetService failed\n"); return rv; } It prints "SetUseGlobalHistory - mGlobalHistory = do_GetService failed". Do you know why? How can I fix it?
Assignee | ||
Comment 4•18 years ago
|
||
I sent this in response to a private e-mail from André: Without knowing your #ifdefs, I can't really know why this is failing. It sounds like you're maybe #ifdef'ing out the registration of the global history service all together? that said, the mozilla should run fine without global history... i.e. even if that fails. Instead of attaching a giant C++ file to the bug, you should attach a patch (made with 'cvs diff') so that we can see what the difference is between the old file and the new file.
Comment 5•18 years ago
|
||
(In reply to comment #4) > I sent this in response to a private e-mail from André: > Without knowing your #ifdefs, I can't really know why this is failing. It > sounds like you're maybe #ifdef'ing out the registration of the global history > service all together? > > that said, the mozilla should run fine without global history... i.e. even if > that fails. > > Instead of attaching a giant C++ file to the bug, you should attach a patch > (made with 'cvs diff') so that we can see what the difference is between the > old file and the new file. > I think you are right about #ifdef'ing out the registration of the global history service. Where is it done? BTW, I know about the cvs diff, but I sent this file just as an example, sorry.
Assignee | ||
Comment 6•18 years ago
|
||
attach a patch and I'll tell you where you made your mistake - if you attach source code (and label it 'text/x-c++src') then I can't view it in my browser :)
Assignee | ||
Comment 7•18 years ago
|
||
its also quite likely that --disable-xul is what disables global history. I think the registration stuff lives in xpfe/components/build
Comment 8•18 years ago
|
||
(In reply to comment #7) > its also quite likely that --disable-xul is what disables global history. I > think the registration stuff lives in xpfe/components/build > Ok! I did this! I had to remove one more component of the nsToolkitCompsModule.cpp. Now the problem is in the Init function of the nsGlobalHistory.cpp when it tries to get the RDF service (it fails). However, it is related to the bug https://bugzilla.mozilla.org/show_bug.cgi?id=318041. But now, I think we are able to disable the autocomplete of the history implementation. Soon, I will send a patch with the required changes in the nsGlobalHistory.cpp/h files.
Comment 9•18 years ago
|
||
Note that for Firefox only (this is a core bug that still affects other consumers) the autocomplete along with global history has been rewritten and placed in a separate file: browser/components/places/src/nsNavHistoryAutoComplete.cpp
Updated•15 years ago
|
QA Contact: cmaximus → history.global
Updated•7 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → WORKSFORME
Updated•6 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•