Chromium Code Reviews| 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()))); |
| } |
| } |