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

Unified Diff: content/browser/indexed_db/indexed_db_dispatcher_host.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_dispatcher_host.cc
diff --git a/content/browser/indexed_db/indexed_db_dispatcher_host.cc b/content/browser/indexed_db/indexed_db_dispatcher_host.cc
index 639bee5fe8511f7c4285416ca70a6f75012de3ab..dba6ec6b234b102ee46192e5e9ecc9a4d1494b8d 100644
--- a/content/browser/indexed_db/indexed_db_dispatcher_host.cc
+++ b/content/browser/indexed_db/indexed_db_dispatcher_host.cc
@@ -95,6 +95,9 @@ void IndexedDBDispatcherHost::ResetDispatcherHosts() {
// messages are processed.
DCHECK(indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread());
+ // Prevent any pending connections from being processed.
+ is_open_ = false;
+
// Note that we explicitly separate CloseAll() from destruction of the
// DatabaseDispatcherHost, since CloseAll() can invoke callbacks which need to
// be dispatched through database_dispatcher_host_.
@@ -248,6 +251,11 @@ void IndexedDBDispatcherHost::DropBlobData(const std::string& uuid) {
--iter->second.second;
}
+bool IndexedDBDispatcherHost::IsOpen() const {
+ DCHECK(indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread());
+ return is_open_;
+}
+
IndexedDBCursor* IndexedDBDispatcherHost::GetCursorFromId(
int32_t ipc_cursor_id) {
DCHECK(indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread());
« no previous file with comments | « content/browser/indexed_db/indexed_db_dispatcher_host.h ('k') | content/browser/indexed_db/indexed_db_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698