Service Worker: Deleting db iterator before closing db.
Common practice is to call Handle{Open/Read/Write}Result() when using the leveldb database. Those functions will close the db upon error - invalidating any open iterators. These calling functions use scoped_ptr's for iterators which, upon error, would delete an invalid leveldb::Iterator instance. ServiceWorkerDatabase::DeleteResourceRecords() ServiceWorkerDatabase::DeleteUserDataForRegistration() ServiceWorkerDatabase::GetAllRegistrations() ServiceWorkerDatabase::GetOriginsWithForeignFetchRegistrations() ServiceWorkerDatabase::GetOriginsWithRegistrations() ServiceWorkerDatabase::GetRegistrationsForOrigin() ServiceWorkerDatabase::ReadResourceIds() ServiceWorkerDatabase::ReadResourceRecords() ServiceWorkerDatabase::ReadUserDataForAllRegistrations() BUG=579624 Review URL: https://codereview.chromium.org/1635223002 Cr-Commit-Position: refs/heads/master@{#371718}
Showing
This diff is collapsed.
Please register or sign in to comment