зеркало из https://github.com/mozilla/pjs.git
Bug 343788: throw an error instead of silently failing when trying to install an OpenSearch search engine that doesn't have an HTML result type, r=jhughes, r=mconnor
This commit is contained in:
Родитель
44c6212ba0
Коммит
c02fd73bbd
|
@ -1429,6 +1429,9 @@ Engine.prototype = {
|
|||
ENSURE(this.name && (this._urls.length > 0),
|
||||
"_parseAsOpenSearch: No name, or missing URL!",
|
||||
Cr.NS_ERROR_FAILURE);
|
||||
ENSURE(this.supportsResponseType(URLTYPE_SEARCH_HTML),
|
||||
"_parseAsOpenSearch: No text/html result type!",
|
||||
Cr.NS_ERROR_FAILURE);
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -2072,11 +2075,6 @@ SearchService.prototype = {
|
|||
// added through a user action
|
||||
}
|
||||
|
||||
if (!aEngine.supportsResponseType(URLTYPE_SEARCH_HTML)) {
|
||||
LOG("_addEngineToStore: Won't add engines that have no HTML output!");
|
||||
return;
|
||||
}
|
||||
|
||||
this._engines[aEngine.name] = aEngine;
|
||||
this._sortedEngines.push(aEngine);
|
||||
notifyAction(aEngine, SEARCH_ENGINE_ADDED);
|
||||
|
|
Загрузка…
Ссылка в новой задаче