diff options
author | brettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-18 23:39:02 +0000 |
---|---|---|
committer | brettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-18 23:39:02 +0000 |
commit | 1d97d2e32c0912611926a7364b5350593d713906 (patch) | |
tree | 40136fca534855d1dac7b2243f52d70ce683c33c /chrome/renderer/net | |
parent | 8a31b03c82d432b6554e17f2e0bec59ca90a40df (diff) | |
download | chromium_src-1d97d2e32c0912611926a7364b5350593d713906.zip chromium_src-1d97d2e32c0912611926a7364b5350593d713906.tar.gz chromium_src-1d97d2e32c0912611926a7364b5350593d713906.tar.bz2 |
Make the global render thread object a regular global object rather than a
special TLS value. This is slightly faster for this commonly-used function, and
we don't ever have more than one (it's like this because we were originally
planning on having more than one RenderThread).
BUG=5635
Review URL: http://codereview.chromium.org/15052
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7272 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/net')
-rw-r--r-- | chrome/renderer/net/render_dns_master.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/chrome/renderer/net/render_dns_master.cc b/chrome/renderer/net/render_dns_master.cc index 0ae4851..736c81e 100644 --- a/chrome/renderer/net/render_dns_master.cc +++ b/chrome/renderer/net/render_dns_master.cc @@ -19,7 +19,7 @@ // This API is used in the render process by renderer_glue.cc. // IF you are in the render process, you MUST be on the renderer thread to call. void DnsPrefetchCString(const char* hostname, size_t length) { - RenderThread::current()->Resolve(hostname, length); + g_render_thread->Resolve(hostname, length); } // The number of hostnames submitted to Browser DNS resolver per call to @@ -58,7 +58,7 @@ void RenderDnsMaster::Resolve(const char* name, size_t length) { if (0 != old_size) return; // Overkill safety net: Don't send too many InvokeLater's. render_dns_factory_.RevokeAll(); - RenderThread::current()->message_loop()->PostDelayedTask(FROM_HERE, + g_render_thread->message_loop()->PostDelayedTask(FROM_HERE, render_dns_factory_.NewRunnableMethod( &RenderDnsMaster::SubmitHostnames), 10); } @@ -92,7 +92,7 @@ void RenderDnsMaster::SubmitHostnames() { DnsPrefetchNames(kMAX_SUBMISSION_PER_TASK); if (new_name_count_ > 0 || 0 < c_string_queue_.Size()) { render_dns_factory_.RevokeAll(); - RenderThread::current()->message_loop()->PostDelayedTask(FROM_HERE, + g_render_thread->message_loop()->PostDelayedTask(FROM_HERE, render_dns_factory_.NewRunnableMethod( &RenderDnsMaster::SubmitHostnames), 10); } else { @@ -148,7 +148,7 @@ void RenderDnsMaster::DnsPrefetchNames(size_t max_count) { new_name_count_ -= names.size(); DCHECK(new_name_count_ >= 0); - RenderThread::current()->Send(new ViewHostMsg_DnsPrefetch(names)); + g_render_thread->Send(new ViewHostMsg_DnsPrefetch(names)); } // is_numeric_ip() checks to see if all characters in name are either numeric, |