mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 806460 - Part 2: more nuanced rejection of malformed records. r=me (fix bustage).
This commit is contained in:
parent
8f9d0d0717
commit
c728d84af7
@ -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();
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user