Bug 997432 - log failures when MozParams don't include a condition attribute, r=gavin

--HG--
extra : rebase_source : e1f3712e88265d6e298b47e59e55d7e2feaf2484
This commit is contained in:
Mike Connor 2014-04-16 19:35:28 -04:00
parent 574425ee47
commit 6645543f29

View File

@ -1810,6 +1810,15 @@ Engine.prototype = {
this._isDefault) {
var value;
let condition = param.getAttribute("condition");
// MozParams must have a condition to be valid
if (!condition) {
let engineLoc = this._location;
let paramName = param.getAttribute("name");
LOG("_parseURL: MozParam (" + paramName + ") without a condition attribute found parsing engine: " + engineLoc);
continue;
}
switch (condition) {
case "purpose":
url.addParam(param.getAttribute("name"),