mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-05 16:46:26 +00:00
warn when trying to add an undefined guid to the tracker's changes list
This commit is contained in:
parent
5968d4080e
commit
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];
|
||||||
|
Loading…
Reference in New Issue
Block a user