Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Issue 1635223002: Service Worker: Deleting db iterator before closing db. (Closed)

Created:
4 years, 11 months ago by cmumford
Modified:
4 years, 11 months ago
Reviewers:
michaeln
CC:
chromium-reviews, michaeln, jsbell+serviceworker_chromium.org, tzik, serviceworker-reviews, jam, kinuko+serviceworker, nhiroki, darin-cc_chromium.org, horo+watch_chromium.org, kinuko+watch, blink-worker-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

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 Committed: https://crrev.com/768a502b9e4705d99ce314c081082f617f90badc Cr-Commit-Position: refs/heads/master@{#371718}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+186 lines, -186 lines) Patch
M content/browser/service_worker/service_worker_database.cc View 10 chunks +186 lines, -186 lines 0 comments Download

Messages

Total messages: 10 (5 generated)
cmumford
4 years, 11 months ago (2016-01-26 21:25:59 UTC) #2
michaeln
lgtm
4 years, 11 months ago (2016-01-26 21:45:14 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1635223002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1635223002/1
4 years, 11 months ago (2016-01-27 03:10:26 UTC) #6
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 11 months ago (2016-01-27 04:16:25 UTC) #8
commit-bot: I haz the power
4 years, 11 months ago (2016-01-27 04:18:43 UTC) #10
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/768a502b9e4705d99ce314c081082f617f90badc
Cr-Commit-Position: refs/heads/master@{#371718}

Powered by Google App Engine
This is Rietveld 408576698