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

Unified Diff: webkit/dom_storage/dom_storage_context.cc

Issue 11458003: Remove scoped_refptr::release which is confusing and causes leaks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix mac Created 8 years 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: webkit/dom_storage/dom_storage_context.cc
diff --git a/webkit/dom_storage/dom_storage_context.cc b/webkit/dom_storage/dom_storage_context.cc
index 6a67e8a5ea02a01d2525c66f05b908e61e8b3f85..abfe5b6af17f4aab263ebc2a26a067b82934aa88 100644
--- a/webkit/dom_storage/dom_storage_context.cc
+++ b/webkit/dom_storage/dom_storage_context.cc
@@ -46,14 +46,13 @@ DomStorageContext::~DomStorageContext() {
if (session_storage_database_.get()) {
// SessionStorageDatabase shouldn't be deleted right away: deleting it will
// potentially involve waiting in leveldb::DBImpl::~DBImpl, and waiting
- // shouldn't happen on this thread. This will unassign the ref counted
- // pointer without decreasing the ref count, and is balanced by the Release
- // that happens later.
+ // shouldn't happen on this thread.
+ session_storage_database_->AddRef();
michaeln 2012/12/06 00:26:12 Same raciness here as mentioned before.
piman 2012/12/06 04:56:27 Done.
task_runner_->PostShutdownBlockingTask(
FROM_HERE,
DomStorageTaskRunner::COMMIT_SEQUENCE,
base::Bind(&SessionStorageDatabase::Release,
- base::Unretained(session_storage_database_.release())));
+ base::Unretained(session_storage_database_.get())));
}
}
« chrome/browser/extensions/api/page_capture/page_capture_api.cc ('K') | « ui/compositor/layer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698