diff options
author | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-04 07:08:47 +0000 |
---|---|---|
committer | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-04 07:08:47 +0000 |
commit | 0c244119ef22e07c63c9cfbf7766f4186ffbef4f (patch) | |
tree | d819f13d18f38955efb80636efa226829c6e72fc /chrome/renderer | |
parent | a1ff0ea6957a8c66b171fb7748db9f8efa0f6924 (diff) | |
download | chromium_src-0c244119ef22e07c63c9cfbf7766f4186ffbef4f.zip chromium_src-0c244119ef22e07c63c9cfbf7766f4186ffbef4f.tar.gz chromium_src-0c244119ef22e07c63c9cfbf7766f4186ffbef4f.tar.bz2 |
Eliminate an implicit string copy from WebString to string16 in order to test
if this might explain the intl1 performance regression. The theory is that
this function is called a lot (once per anchor), so it may be a hot-spot.
Previously, we did not have this extra string copy.
TBR=brettw
Review URL: http://codereview.chromium.org/39118
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10880 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer')
-rw-r--r-- | chrome/renderer/renderer_webkitclient_impl.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/chrome/renderer/renderer_webkitclient_impl.cc b/chrome/renderer/renderer_webkitclient_impl.cc index 5511a9b..958efd5 100644 --- a/chrome/renderer/renderer_webkitclient_impl.cc +++ b/chrome/renderer/renderer_webkitclient_impl.cc @@ -38,7 +38,8 @@ WebKit::WebString RendererWebKitClientImpl::cookies( void RendererWebKitClientImpl::prefetchHostName( const WebKit::WebString& hostname) { if (!hostname.isEmpty()) { - const std::string& hostname_utf8 = UTF16ToUTF8(hostname); + std::string hostname_utf8; + UTF16ToUTF8(hostname.characters(), hostname.length(), &hostname_utf8); DnsPrefetchCString(hostname_utf8.data(), hostname_utf8.length()); } } |