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

Side by Side Diff: base/task.cc

Issue 7598015: Revert 95441 (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/task.h" 5 #include "base/task.h"
6 6
7 Task::Task() { 7 Task::Task() {
8 } 8 }
9 9
10 Task::~Task() { 10 Task::~Task() {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 should_leak_task_(should_leak_task) { 46 should_leak_task_(should_leak_task) {
47 } 47 }
48 48
49 TaskClosureAdapter::~TaskClosureAdapter() { 49 TaskClosureAdapter::~TaskClosureAdapter() {
50 if (!*should_leak_task_) { 50 if (!*should_leak_task_) {
51 delete task_; 51 delete task_;
52 } 52 }
53 } 53 }
54 54
55 void TaskClosureAdapter::Run() { 55 void TaskClosureAdapter::Run() {
56 if (task_) { 56 task_->Run();
57 task_->Run(); 57 delete task_;
58 delete task_; 58 task_ = NULL;
59 task_ = NULL;
60 }
61 } 59 }
62 60
63 // Don't leak tasks by default. 61 // Don't leak tasks by default.
64 bool TaskClosureAdapter::kTaskLeakingDefault = false; 62 bool TaskClosureAdapter::kTaskLeakingDefault = false;
65 63
66 } // namespace subtle 64 } // namespace subtle
67 65
68 } // namespace base 66 } // namespace base
OLDNEW
« 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