зеркало из https://github.com/mozilla/gecko-dev.git
bug 700218 - Unclosed Cursor detected assertions when running Fennec Native r=dougt
This commit is contained in:
Родитель
d1545231e8
Коммит
60144e7de8
|
@ -91,6 +91,7 @@ class GlobalHistory {
|
|||
} while (c.moveToNext());
|
||||
}
|
||||
mVisitedCache = new SoftReference<Set<String>>(visitedSet);
|
||||
c.close();
|
||||
}
|
||||
|
||||
// this runs on the same handler thread as the checkUriVisited code,
|
||||
|
|
|
@ -325,7 +325,9 @@ public class Tab {
|
|||
Browser.BookmarkColumns.URL + " = ? and " + Browser.BookmarkColumns.BOOKMARK + " = ?",
|
||||
new String[] { getURL(), "1" },
|
||||
Browser.BookmarkColumns.URL);
|
||||
if (cursor.getCount() == 1)
|
||||
int count = cursor.getCount();
|
||||
cursor.close();
|
||||
if (count == 1)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
|
@ -362,9 +364,11 @@ public class Tab {
|
|||
values.put(Browser.BookmarkColumns.URL, mUrl);
|
||||
resolver.insert(Browser.BOOKMARKS_URI,
|
||||
values);
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
cursor.close();
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Загрузка…
Ссылка в новой задаче