Fix leak when jobs complete

The JobQueue wasn't deleting the jobs after they finished.

TBR=kinuko@chromium.org
BUG=

Review URL: https://codereview.chromium.org/132823002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@244016 0039d316-1c4b-4281-b951-d872f2087c98
parent 108828d1
...@@ -32,6 +32,7 @@ void ServiceWorkerJobCoordinator::JobQueue::Push( ...@@ -32,6 +32,7 @@ void ServiceWorkerJobCoordinator::JobQueue::Push(
void ServiceWorkerJobCoordinator::JobQueue::Pop(ServiceWorkerRegisterJob* job) { void ServiceWorkerJobCoordinator::JobQueue::Pop(ServiceWorkerRegisterJob* job) {
DCHECK(job == jobs_.front()); DCHECK(job == jobs_.front());
jobs_.pop_front(); jobs_.pop_front();
delete job;
if (!jobs_.empty()) if (!jobs_.empty())
jobs_.front()->Start(); jobs_.front()->Start();
} }
......
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