Commit 726cadbe authored by apatrick@chromium.org's avatar apatrick@chromium.org

TaskClosureAdapter::Run does not invoke the task if it is null.

This is an attempt to fix http://crbug.com/81449. If this actually fixes it then there is probably something more fundamentally wrong.

BUG=81449
Review URL: http://codereview.chromium.org/7563025

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95441 0039d316-1c4b-4281-b951-d872f2087c98
parent fa339bc1
......@@ -53,9 +53,11 @@ TaskClosureAdapter::~TaskClosureAdapter() {
}
void TaskClosureAdapter::Run() {
task_->Run();
delete task_;
task_ = NULL;
if (task_) {
task_->Run();
delete task_;
task_ = NULL;
}
}
// Don't leak tasks by default.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment