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

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

Issue 2892703003: [IndexedDB] Fixed possible refcount race (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/indexed_db/indexed_db_context_impl.cc
diff --git a/content/browser/indexed_db/indexed_db_context_impl.cc b/content/browser/indexed_db/indexed_db_context_impl.cc
index c79635f991e78ea24068f999cbe84b956a328bc8..ec8a2c8fb37568edbd73a453ffec3e14a3b81526 100644
--- a/content/browser/indexed_db/indexed_db_context_impl.cc
+++ b/content/browser/indexed_db/indexed_db_context_impl.cc
@@ -467,9 +467,9 @@ void IndexedDBContextImpl::DatabaseDeleted(const Origin& origin) {
IndexedDBContextImpl::~IndexedDBContextImpl() {
if (factory_.get()) {
- TaskRunner()->PostTask(
- FROM_HERE, base::Bind(&IndexedDBFactory::ContextDestroyed, factory_));
- factory_ = NULL;
pwnall 2017/05/19 00:16:32 why not nullptr?
+ TaskRunner()->PostTask(FROM_HERE,
+ base::Bind(&IndexedDBFactory::ContextDestroyed,
+ base::Passed(&factory_)));
}
if (data_path_.empty())
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698