зеркало из https://github.com/mozilla/gecko-dev.git
Bug 806460 - Part 2: more nuanced rejection of malformed records. r=me (fix bustage).
This commit is contained in:
Родитель
e78c3da7ed
Коммит
d29f11cef0
|
@ -434,7 +434,7 @@ BookmarksStore.prototype = {
|
|||
preprocessTagQuery: function preprocessTagQuery(record) {
|
||||
if (record.type != "query" ||
|
||||
record.bmkUri == null ||
|
||||
record.folderName == null)
|
||||
!record.folderName)
|
||||
return;
|
||||
|
||||
// Yes, this works without chopping off the "place:" prefix.
|
||||
|
@ -501,8 +501,7 @@ BookmarksStore.prototype = {
|
|||
|
||||
// Skip malformed records. (Bug 806460.)
|
||||
if (record.type == "query" &&
|
||||
(!record.bmkUri ||
|
||||
!record.folderName)) {
|
||||
!record.bmkUri) {
|
||||
this._log.warn("Skipping malformed query bookmark: " + record.id);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -393,8 +393,12 @@ add_test(function test_empty_query_doesnt_die() {
|
|||
record.parentName = "Toolbar";
|
||||
record.parentid = "toolbar";
|
||||
|
||||
// This should not throw.
|
||||
// These should not throw.
|
||||
store.applyIncoming(record);
|
||||
|
||||
delete record.folderName;
|
||||
store.applyIncoming(record);
|
||||
|
||||
run_next_test();
|
||||
});
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче