summaryrefslogtreecommitdiffstats
path: root/net/proxy/single_threaded_proxy_resolver.cc
diff options
context:
space:
mode:
authoreroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-20 00:59:16 +0000
committereroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-20 00:59:16 +0000
commitb92c77b16690690325be3d8ec045838b894eb333 (patch)
tree5d2c709f7c5c0e75d7f1edfb7523d19b66b793e9 /net/proxy/single_threaded_proxy_resolver.cc
parent7e3e7bbc2f33e511296214b9fdf9f556c19e21e5 (diff)
downloadchromium_src-b92c77b16690690325be3d8ec045838b894eb333.zip
chromium_src-b92c77b16690690325be3d8ec045838b894eb333.tar.gz
chromium_src-b92c77b16690690325be3d8ec045838b894eb333.tar.bz2
Remove some unnecessary manual AddRef/Release.
These aren't needed since NewRunnableMethod() already holds a reference, ensuring it can't be deleted while tasks are outstanding. BUG=none. TEST=continue to pass existing unit tests, especially when run under valgrind. Review URL: http://codereview.chromium.org/269037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29485 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/proxy/single_threaded_proxy_resolver.cc')
-rw-r--r--net/proxy/single_threaded_proxy_resolver.cc9
1 files changed, 0 insertions, 9 deletions
diff --git a/net/proxy/single_threaded_proxy_resolver.cc b/net/proxy/single_threaded_proxy_resolver.cc
index af8d7bf..02afcfc 100644
--- a/net/proxy/single_threaded_proxy_resolver.cc
+++ b/net/proxy/single_threaded_proxy_resolver.cc
@@ -44,9 +44,6 @@ class SingleThreadedProxyResolver::SetPacScriptTask
// Start the SetPacScript request on the worker thread.
void Start() {
- // TODO(eroman): Are these manual AddRef / Release necessary?
- AddRef(); // balanced in RequestComplete
-
coordinator_->thread()->message_loop()->PostTask(
FROM_HERE, NewRunnableMethod(this, &SetPacScriptTask::DoRequest,
coordinator_->resolver_.get()));
@@ -82,8 +79,6 @@ class SingleThreadedProxyResolver::SetPacScriptTask
coordinator_->RemoveOutstandingSetPacScriptTask(this);
callback->Run(result_code);
}
-
- Release(); // Balances the AddRef in Start.
}
// Must only be used on the "origin" thread.
@@ -122,7 +117,6 @@ class SingleThreadedProxyResolver::Job
// Start the resolve proxy request on the worker thread.
void Start() {
is_started_ = true;
- AddRef(); // balanced in QueryComplete
coordinator_->thread()->message_loop()->PostTask(
FROM_HERE, NewRunnableMethod(this, &Job::DoQuery,
@@ -175,9 +169,6 @@ class SingleThreadedProxyResolver::Job
if (!was_cancelled())
coordinator_->RemoveFrontOfJobsQueueAndStartNext(this);
}
-
- Release(); // Balances the AddRef in Start. We may get deleted after
- // we return.
}
// Must only be used on the "origin" thread.