Bug 526989 - getEngines, getVisibleEngines and getDefaultEngines engineCount out params should be optional. r=gavin

--HG--
extra : rebase_source : ea466269b081c55e6ce4d178a00a9b882f65ac93
This commit is contained in:
Dão Gottwald 2009-11-06 22:56:26 +01:00
parent 795121a212
commit 78ce9ba60d
4 changed files with 8 additions and 8 deletions

View File

@ -300,13 +300,13 @@ EngineChangeOp.prototype = {
function EngineStore() {
var searchService = Cc["@mozilla.org/browser/search-service;1"].
getService(Ci.nsIBrowserSearchService);
this._engines = searchService.getVisibleEngines({}).map(this._cloneEngine);
this._defaultEngines = searchService.getDefaultEngines({}).map(this._cloneEngine);
this._engines = searchService.getVisibleEngines().map(this._cloneEngine);
this._defaultEngines = searchService.getDefaultEngines().map(this._cloneEngine);
this._ops = [];
// check if we need to disable the restore defaults button
var someHidden = this._defaultEngines.some(function (e) {return e.hidden;});
var someHidden = this._defaultEngines.some(function (e) e.hidden);
gEngineManagerDialog.showRestoreDefaults(someHidden);
}
EngineStore.prototype = {

View File

@ -149,7 +149,7 @@
<property name="engines" readonly="true">
<getter><![CDATA[
if (!this._engines)
this._engines = this.searchService.getVisibleEngines({ });
this._engines = this.searchService.getVisibleEngines();
return this._engines;
]]></getter>
</property>

View File

@ -262,7 +262,7 @@ interface nsIBrowserSearchService : nsISupports
* @returns an array of nsISearchEngine objects.
*/
void getEngines(
out unsigned long engineCount,
[optional] out unsigned long engineCount,
[retval, array, size_is(engineCount)] out nsISearchEngine engines);
/**
@ -272,7 +272,7 @@ interface nsIBrowserSearchService : nsISupports
* @returns an array of nsISearchEngine objects.
*/
void getVisibleEngines(
out unsigned long engineCount,
[optional] out unsigned long engineCount,
[retval, array, size_is(engineCount)] out nsISearchEngine engines);
/**
@ -283,7 +283,7 @@ interface nsIBrowserSearchService : nsISupports
* @returns an array of nsISearchEngine objects.
*/
void getDefaultEngines(
out unsigned long engineCount,
[optional] out unsigned long engineCount,
[retval, array, size_is(engineCount)] out nsISearchEngine engines);
/**

View File

@ -3670,7 +3670,7 @@ var engineUpdateService = {
getService(Ci.nsIBrowserSearchService);
var currentTime = Date.now();
ULOG("currentTime: " + currentTime);
for each (engine in searchService.getEngines({})) {
for each (engine in searchService.getEngines()) {
engine = engine.wrappedJSObject;
if (!engine._hasUpdates)
continue;