1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-13 08:25:46 +01:00

Fix completions for FF3.6

Also see: https://bugzilla.mozilla.org/show_bug.cgi?id=510589
This commit is contained in:
Martin Stubenschrott
2009-08-14 23:45:42 +02:00
parent e842bf8cc9
commit fb44ca22dc
5 changed files with 19 additions and 25 deletions

View File

@@ -32,7 +32,11 @@ function Services()
ifaces.forEach(function (iface) res.QueryInterface(iface));
return res;
}
catch (e) {}
catch (e)
{
// liberator.log() is not defined at this time, so just dump any error
dump("Service creation failed for '" + classes + "': " + e);
}
}
const self = {
@@ -86,7 +90,7 @@ function Services()
};
self.add("appStartup", "@mozilla.org/toolkit/app-startup;1", Ci.nsIAppStartup);
self.add("autoCompleteSearch", "@mozilla.org/browser/global-history;2", Ci.nsIAutoCompleteSearch);
self.add("autoCompleteSearch", "@mozilla.org/autocomplete/search;1?name=history", Ci.nsIAutoCompleteSearch);
self.add("browserSearch", "@mozilla.org/browser/search-service;1", Ci.nsIBrowserSearchService);
self.add("cache", "@mozilla.org/network/cache-service;1", Ci.nsICacheService);
self.add("commandLineHandler", "@mozilla.org/commandlinehandler/general-startup;1?type=liberator", Ci.nsICommandLineHandler);

View File

@@ -402,28 +402,11 @@ function CommandLine() //{{{
{
function done() !(idx >= n + context.items.length || idx == -2 && !context.items.length);
while (context.incomplete && !done())
// threadYield(true, true) would be better, but it does not return on my
// machine until all awesomebar completions were reported, making
// :open foo<tab> nearly unusable, if the first 2 foo-completions would
// be there fast, but it takes up to 20 sec to find more foo-completions
//
// The strange thing is, I tested the 2009-01-07 nightly at work in Windows
// and it seemed to work perfectly there. Will have to see if it's a
// hardware (dual core there, vs. P4 at home) issue or an OS issue.
//
// While I *really* prefer this solution over my hack
// when it works, we can't have a nearly-defect :open
// prompt when releasing vimp 2.0, even not just on certain
// computers, as :open is probably the most often used ex-command
// in vimperator
//
// liberator.threadYield(false, true); is just a temporary measure as
// it has other problems (hitting tab often in a row), until we find the
// source of the problem (which we hopefully do, as I really don't want to
// have to revert to my hack when better solutions exist)
liberator.threadYield(false, true);
if (done())
break;
n += context.items.length;
}
}