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

Unified Diff: webkit/quota/quota_task.cc

Issue 10913093: Merge 152532 - Quota double-delete fix (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1229/src/
Patch Set: Created 8 years, 3 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 | « webkit/quota/quota_task.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/quota/quota_task.cc
===================================================================
--- webkit/quota/quota_task.cc (revision 154997)
+++ webkit/quota/quota_task.cc (working copy)
@@ -30,7 +30,8 @@
QuotaTask::QuotaTask(QuotaTaskObserver* observer)
: observer_(observer),
- original_task_runner_(base::MessageLoopProxy::current()) {
+ original_task_runner_(base::MessageLoopProxy::current()),
+ delete_scheduled_(false) {
}
void QuotaTask::CallCompleted() {
@@ -48,6 +49,10 @@
}
void QuotaTask::DeleteSoon() {
+ DCHECK(original_task_runner_->BelongsToCurrentThread());
+ if (delete_scheduled_)
+ return;
+ delete_scheduled_ = true;
MessageLoop::current()->DeleteSoon(FROM_HERE, this);
}
« no previous file with comments | « webkit/quota/quota_task.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698