diff options
author | michaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-29 21:49:31 +0000 |
---|---|---|
committer | michaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-29 21:49:31 +0000 |
commit | 792d717964eddcc891489aa73bd5363871da9d8f (patch) | |
tree | b94d639aaa69b4b3ea7bd6aa99f1da5fe9144cbb /webkit/dom_storage | |
parent | b70188bdbfefb415747f711e9881a50903f0d159 (diff) | |
download | chromium_src-792d717964eddcc891489aa73bd5363871da9d8f.zip chromium_src-792d717964eddcc891489aa73bd5363871da9d8f.tar.gz chromium_src-792d717964eddcc891489aa73bd5363871da9d8f.tar.bz2 |
Switch all domstorage tasks to be shutdown blocking to allow changes to be flushed to disk on shutdown.
Review URL: https://chromiumcodereview.appspot.com/10444065
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139383 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/dom_storage')
-rw-r--r-- | webkit/dom_storage/dom_storage_task_runner.cc | 2 | ||||
-rw-r--r-- | webkit/dom_storage/dom_storage_task_runner.h | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/webkit/dom_storage/dom_storage_task_runner.cc b/webkit/dom_storage/dom_storage_task_runner.cc index 3f813fd..f25699c 100644 --- a/webkit/dom_storage/dom_storage_task_runner.cc +++ b/webkit/dom_storage/dom_storage_task_runner.cc @@ -51,7 +51,7 @@ bool DomStorageWorkerPoolTaskRunner::PostDelayedTask( if (delay == base::TimeDelta()) { return sequenced_worker_pool_->PostSequencedWorkerTaskWithShutdownBehavior( primary_sequence_token_, from_here, task, - base::SequencedWorkerPool::SKIP_ON_SHUTDOWN); + base::SequencedWorkerPool::BLOCK_SHUTDOWN); } // Post a task to call this->PostTask() after the delay. return message_loop_->PostDelayedTask( diff --git a/webkit/dom_storage/dom_storage_task_runner.h b/webkit/dom_storage/dom_storage_task_runner.h index ee99f22..eb9da80 100644 --- a/webkit/dom_storage/dom_storage_task_runner.h +++ b/webkit/dom_storage/dom_storage_task_runner.h @@ -21,8 +21,9 @@ namespace dom_storage { // primary access from queuing up behind commits to disk. // * Initialization, shutdown, and administrative tasks are performed as // shutdown-blocking primary sequence tasks. -// * Methods that return values to the javascript'able interface are performed -// as non-shutdown-blocking primary sequence tasks. +// * Tasks directly related to the javascript'able interface are performed +// as shutdown-blocking primary sequence tasks. +// TODO(michaeln): Skip tasks for reading during shutdown. // * Internal tasks related to committing changes to disk are performed as // shutdown-blocking commit sequence tasks. class DomStorageTaskRunner : public base::TaskRunner { @@ -33,7 +34,7 @@ class DomStorageTaskRunner : public base::TaskRunner { }; // The PostTask() and PostDelayedTask() methods defined by TaskRunner - // post non-shutdown-blocking tasks on the primary sequence. + // post shutdown-blocking tasks on the primary sequence. virtual bool PostDelayedTask( const tracked_objects::Location& from_here, const base::Closure& task, |