зеркало из https://github.com/mozilla/gecko-dev.git
Fix a typo-induced bug in the storage calendar as well as a whole bunch of warning spew (bug 305404), r=mvl
This commit is contained in:
Родитель
65051b945e
Коммит
fc87cfcb35
|
@ -10,7 +10,7 @@ for (var i = 0; i < document.styleSheets.length; i++) {
|
|||
}
|
||||
}
|
||||
if (!calendarPrefStyleSheet)
|
||||
Components.reportError("Couldn't find our magic empty style sheet.")
|
||||
Components.utils.reportError("Couldn't find our magic empty style sheet.")
|
||||
|
||||
function updateStyleSheetForCalendar(aCalendar)
|
||||
{
|
||||
|
|
|
@ -46,9 +46,12 @@
|
|||
|
||||
onGetResult: function onGetResult(aCalendar, aStatus, aItemType, aDetail, aCount, aItems)
|
||||
{
|
||||
if (!Components.isSuccessCode(aStatus))
|
||||
return Components.utils.reportError("Failed to fetch todo items: " + aStatus)
|
||||
|
||||
if (!Components.isSuccessCode(aStatus)) {
|
||||
Components.utils.reportError(
|
||||
"Failed to fetch todo items: 0x" +
|
||||
aStatus.toString(16));
|
||||
return;
|
||||
}
|
||||
aItems.forEach(this.todoList.addTodo, this.todoList);
|
||||
},
|
||||
|
||||
|
@ -56,8 +59,9 @@
|
|||
aDetail)
|
||||
{
|
||||
if (!Components.isSuccessCode(aStatus))
|
||||
Components.utils.reportError("Failed to fetch todo item (" +
|
||||
aId + "): " + aStatus);
|
||||
Components.utils.reportError("Failed to fetch todo item"
|
||||
+ "(" + aId + "): 0x" +
|
||||
aStatus.toString(16));
|
||||
},
|
||||
|
||||
QueryInterface: function QueryInterface(aIID) {
|
||||
|
|
|
@ -243,7 +243,6 @@ calICSCalendar.prototype = {
|
|||
},
|
||||
onGetResult: function(aCalendar, aStatus, aItemType, aDetail, aCount, aItems)
|
||||
{
|
||||
var lastmodifed;
|
||||
for (var i=0; i<aCount; i++) {
|
||||
calComp.addSubcomponent(aItems[i].icalComponent);
|
||||
}
|
||||
|
|
|
@ -122,8 +122,9 @@ function createStatement (dbconn, sql) {
|
|||
wrapper.initialize(stmt);
|
||||
return wrapper;
|
||||
} catch (e) {
|
||||
Components.reportError("mozStorage exception: createStatement failed, statement: '" +
|
||||
sql + "', error: '" + dbconn.lastErrorString + "'");
|
||||
Components.utils.reportError(
|
||||
"mozStorage exception: createStatement failed, statement: '" +
|
||||
sql + "', error: '" + dbconn.lastErrorString + "'");
|
||||
}
|
||||
|
||||
return null;
|
||||
|
@ -893,7 +894,8 @@ calStorageCalendar.prototype = {
|
|||
oldVersion = 3;
|
||||
} catch (e) {
|
||||
dump ("+++++++++++++++++ DB Error: " + this.mDB.lastErrorString + "\n");
|
||||
Components.reportError("Upgrade failed! DB Error: " + this.mDB.lastErrorString);
|
||||
Components.utils.reportError("Upgrade failed! DB Error: " +
|
||||
this.mDB.lastErrorString);
|
||||
this.mDB.rollbackTransaction();
|
||||
throw e;
|
||||
}
|
||||
|
@ -925,7 +927,8 @@ calStorageCalendar.prototype = {
|
|||
oldVersion = 4;
|
||||
} catch (e) {
|
||||
dump ("+++++++++++++++++ DB Error: " + this.mDB.lastErrorString + "\n");
|
||||
Components.reportError("Upgrade failed! DB Error: " + this.mDB.lastErrorString);
|
||||
Components.utils.reportError("Upgrade failed! DB Error: " +
|
||||
this.mDB.lastErrorString);
|
||||
this.mDB.rollbackTransaction();
|
||||
throw e;
|
||||
}
|
||||
|
@ -1413,7 +1416,8 @@ calStorageCalendar.prototype = {
|
|||
this.mDB.commitTransaction();
|
||||
} catch (e) {
|
||||
dump("flushItem DB error: " + this.mDB.lastErrorString + "\n");
|
||||
Components.reportError("flushItem DB error: " + this.mDB.lastErrorString);
|
||||
Components.utils.reportError("flushItem DB error: " +
|
||||
this.mDB.lastErrorString);
|
||||
this.mDB.rollbackTransaction();
|
||||
throw e;
|
||||
}
|
||||
|
@ -1522,7 +1526,7 @@ calStorageCalendar.prototype = {
|
|||
ip.last_modified = tmp.nativeTime;
|
||||
|
||||
ip.title = item.getUnproxiedProperty("SUMMARY");
|
||||
ip.priority = item.getUnproxiedProperty("PRIROITY");
|
||||
ip.priority = item.getUnproxiedProperty("PRIORITY");
|
||||
ip.privacy = item.getUnproxiedProperty("PRIVACY");
|
||||
ip.ical_status = item.getUnproxiedProperty("STATUS");
|
||||
|
||||
|
@ -1692,7 +1696,8 @@ calStorageCalendar.prototype = {
|
|||
this.mDeleteTodo(aID);
|
||||
this.mDB.commitTransaction();
|
||||
} catch (e) {
|
||||
Components.reportError("deleteItemById DB error: " + this.mDB.lastErrorString);
|
||||
Components.utils.reportError("deleteItemById DB error: " +
|
||||
this.mDB.lastErrorString);
|
||||
this.mDB.rollbackTransaction();
|
||||
throw e;
|
||||
}
|
||||
|
|
|
@ -84,7 +84,7 @@ function doCreateCalendar()
|
|||
if (already.length) {
|
||||
if (type != 'local') {
|
||||
// signalError("Already have calendar at this URI.");
|
||||
Components.reportError("Already have calendar with URI " + uri);
|
||||
Components.utils.reportError("Already have calendar with URI " + uri);
|
||||
return false;
|
||||
}
|
||||
uri = uri.replace(/id=(\d+)/,
|
||||
|
|
Загрузка…
Ссылка в новой задаче