зеркало из https://github.com/mozilla/pjs.git
Bug 747040 - Trivial guard against NPE in AndroidBrowserBookmarksRepositorySession.retrieveRecord. r=trivial, a=blocking-fennec
This commit is contained in:
Родитель
46a49ddccd
Коммит
a33cfebc3a
|
@ -431,6 +431,12 @@ public class AndroidBrowserBookmarksRepositorySession extends AndroidBrowserRepo
|
|||
String parentName = getParentName(androidParentGUID);
|
||||
BookmarkRecord bookmark = AndroidBrowserBookmarksRepositorySession.bookmarkFromMirrorCursor(cur, androidParentGUID, parentName, childArray);
|
||||
|
||||
if (bookmark == null) {
|
||||
Logger.warn(LOG_TAG, "Unable to extract bookmark from cursor. Record GUID " + recordGUID +
|
||||
", parent " + androidParentGUID + "/" + androidParentID);
|
||||
return null;
|
||||
}
|
||||
|
||||
if (needsReparenting) {
|
||||
Logger.warn(LOG_TAG, "Bookmark record " + recordGUID + " has a bad parent pointer. Reparenting now.");
|
||||
|
||||
|
@ -908,6 +914,8 @@ public class AndroidBrowserBookmarksRepositorySession extends AndroidBrowserRepo
|
|||
if (typeString == null) {
|
||||
Logger.warn(LOG_TAG, "Unsupported type code " + rowType);
|
||||
return null;
|
||||
} else {
|
||||
Logger.trace(LOG_TAG, "Record " + guid + " has type " + typeString);
|
||||
}
|
||||
|
||||
rec.type = typeString;
|
||||
|
|
Загрузка…
Ссылка в новой задаче