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

Unified Diff: content/browser/indexed_db/indexed_db_database.cc

Issue 2386683003: IndexedDB: Ignore open/delete requests from terminated renderers. (Closed)
Patch Set: Allow deletes to proceed Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/indexed_db/indexed_db_database.cc
diff --git a/content/browser/indexed_db/indexed_db_database.cc b/content/browser/indexed_db/indexed_db_database.cc
index c25f47e32d7f26dc9a0ca196482eaeb4075f5369..10821c3c0b8c2f084a0a318e0468bdc57548cff8 100644
--- a/content/browser/indexed_db/indexed_db_database.cc
+++ b/content/browser/indexed_db/indexed_db_database.cc
@@ -118,6 +118,11 @@ class IndexedDBDatabase::OpenRequest
: ConnectionRequest(db), pending_(std::move(pending_connection)) {}
void Perform() override {
+ if (!pending_->callbacks->IsValid()) {
+ db_->RequestComplete(this);
+ return;
+ }
+
if (db_->metadata_.id == kInvalidId) {
// The database was deleted then immediately re-opened; OpenInternal()
// recreates it in the backing store.
« no previous file with comments | « content/browser/indexed_db/indexed_db_callbacks.cc ('k') | content/browser/indexed_db/indexed_db_database_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698