Bug 502482 - error while syncing bookmarks from server

Set the item type for generic PlacesItems, but don't do anything when trying to create it.
This commit is contained in:
Edward Lee 2009-07-09 17:15:00 -07:00
parent ee3c44ba86
commit 0d43caf465
2 changed files with 8 additions and 3 deletions

View File

@ -280,6 +280,9 @@ BookmarksStore.prototype = {
this._log.debug(" -> creating separator"); this._log.debug(" -> creating separator");
newId = this._bms.insertSeparator(parentId, record.sortindex); newId = this._bms.insertSeparator(parentId, record.sortindex);
break; break;
case "item":
this._log.debug(" -> got a generic places item.. do nothing?");
break;
default: default:
this._log.error("_create: Unknown item type: " + record.type); this._log.error("_create: Unknown item type: " + record.type);
break; break;

View File

@ -75,8 +75,10 @@ PlacesItem.prototype = {
return Livemark; return Livemark;
case "separator": case "separator":
return BookmarkSeparator; return BookmarkSeparator;
case "item":
return PlacesItem;
} }
throw "Unknown places item object type"; throw "Unknown places item object type: " + type;
}, },
__proto__: CryptoWrapper.prototype, __proto__: CryptoWrapper.prototype,
@ -84,8 +86,8 @@ PlacesItem.prototype = {
_PlacesItem_init: function BmkItemRec_init(uri) { _PlacesItem_init: function BmkItemRec_init(uri) {
this._CryptoWrap_init(uri); this._CryptoWrap_init(uri);
this.cleartext = { this.cleartext = {};
}; this.type = "item";
}, },
}; };