Bug 709325 - Log records without newlines; r=rnewman

--HG--
extra : rebase_source : a9d75a4385a51e79884c8b97675754025ab46d7b
This commit is contained in:
Gregory Szorc 2011-12-13 14:54:17 -08:00
parent b9449f000f
commit 218056e9c3

View File

@ -112,13 +112,15 @@ WBORecord.prototype = {
return obj;
},
toString: function WBORec_toString() "{ " + [
"id: " + this.id,
"index: " + this.sortindex,
"modified: " + this.modified,
"ttl: " + this.ttl,
"payload: " + JSON.stringify(this.payload)
].join("\n ") + " }",
toString: function toString() {
return "{ " +
"id: " + this.id + " " +
"index: " + this.sortindex + " " +
"modified: " + this.modified + " " +
"ttl: " + this.ttl + " " +
"payload: " + JSON.stringify(this.payload) +
" }";
}
};
Utils.deferGetSet(WBORecord, "data", ["id", "modified", "sortindex", "payload"]);
@ -259,14 +261,18 @@ CryptoWrapper.prototype = {
return this.cleartext;
},
toString: function CryptoWrap_toString() "{ " + [
"id: " + this.id,
"index: " + this.sortindex,
"modified: " + this.modified,
"ttl: " + this.ttl,
"payload: " + (this.deleted ? "DELETED" : JSON.stringify(this.cleartext)),
"collection: " + (this.collection || "undefined")
].join("\n ") + " }",
toString: function toString() {
let payload = this.deleted ? "DELETED" : JSON.stringify(this.cleartext);
return "{ " +
"id: " + this.id + " " +
"index: " + this.sortindex + " " +
"modified: " + this.modified + " " +
"ttl: " + this.ttl + " " +
"payload: " + payload + " " +
"collection: " + (this.collection || "undefined") +
" }";
},
// The custom setter below masks the parent's getter, so explicitly call it :(
get id() WBORecord.prototype.__lookupGetter__("id").call(this),