зеркало из https://github.com/mozilla/gecko-dev.git
warn when trying to add an undefined guid to the tracker's changes list
This commit is contained in:
Родитель
5968d4080e
Коммит
87460d1ad0
|
@ -166,6 +166,10 @@ Tracker.prototype = {
|
||||||
addChangedID: function T_addChangedID(id) {
|
addChangedID: function T_addChangedID(id) {
|
||||||
if (!this.enabled)
|
if (!this.enabled)
|
||||||
return;
|
return;
|
||||||
|
if (!id) {
|
||||||
|
this._log.warn("Attempted to add undefined ID to tracker");
|
||||||
|
return;
|
||||||
|
}
|
||||||
this._log.debug("Adding changed ID " + id);
|
this._log.debug("Adding changed ID " + id);
|
||||||
if (!this.changedIDs[id]) {
|
if (!this.changedIDs[id]) {
|
||||||
this.changedIDs[id] = true;
|
this.changedIDs[id] = true;
|
||||||
|
@ -176,6 +180,10 @@ Tracker.prototype = {
|
||||||
removeChangedID: function T_removeChangedID(id) {
|
removeChangedID: function T_removeChangedID(id) {
|
||||||
if (!this.enabled)
|
if (!this.enabled)
|
||||||
return;
|
return;
|
||||||
|
if (!id) {
|
||||||
|
this._log.warn("Attempted to remove undefined ID from tracker");
|
||||||
|
return;
|
||||||
|
}
|
||||||
this._log.debug("Removing changed ID " + id);
|
this._log.debug("Removing changed ID " + id);
|
||||||
if (this.changedIDs[id]) {
|
if (this.changedIDs[id]) {
|
||||||
delete this.changedIDs[id];
|
delete this.changedIDs[id];
|
||||||
|
|
Загрузка…
Ссылка в новой задаче