зеркало из https://github.com/mozilla/pjs.git
Bug 718238 - Part 4: Safety in checkRecordType. r=nalexander
This commit is contained in:
Родитель
94461e643c
Коммит
ac2465bdd6
|
@ -460,12 +460,19 @@ public class AndroidBrowserBookmarksRepositorySession extends AndroidBrowserRepo
|
|||
|
||||
@Override
|
||||
protected boolean checkRecordType(Record record) {
|
||||
BookmarkRecord bmk = (BookmarkRecord) record;
|
||||
if (bmk.type.equalsIgnoreCase(AndroidBrowserBookmarksDataAccessor.TYPE_BOOKMARK) ||
|
||||
bmk.type.equalsIgnoreCase(AndroidBrowserBookmarksDataAccessor.TYPE_FOLDER)) {
|
||||
if (!(record instanceof BookmarkRecord)) {
|
||||
return false;
|
||||
}
|
||||
if (record.deleted) {
|
||||
return true;
|
||||
}
|
||||
Logger.info(LOG_TAG, "Ignoring record with guid: " + record.guid + " and type: " + ((BookmarkRecord)record).type);
|
||||
BookmarkRecord bmk = (BookmarkRecord) record;
|
||||
|
||||
if (bmk.isBookmark() ||
|
||||
bmk.isFolder()) {
|
||||
return true;
|
||||
}
|
||||
Logger.info(LOG_TAG, "Ignoring record with guid: " + bmk.guid + " and type: " + bmk.type);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче