summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/search_extension.cc
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-24 19:33:17 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-24 19:33:17 +0000
commit476f1c53ebdd8a5ddcadef5c34123f5492887176 (patch)
treec69b1c15006ea5800dc2444729aa78d68d10f0de /chrome/renderer/search_extension.cc
parentd0742d72600ba1eb33aff7d0ed43c8a118dcd141 (diff)
downloadchromium_src-476f1c53ebdd8a5ddcadef5c34123f5492887176.zip
chromium_src-476f1c53ebdd8a5ddcadef5c34123f5492887176.tar.gz
chromium_src-476f1c53ebdd8a5ddcadef5c34123f5492887176.tar.bz2
Makes window.chrome.setSuggestResult pass through an empty string.
BUG=59834 TEST=none Review URL: http://codereview.chromium.org/3991005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63691 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/search_extension.cc')
-rw-r--r--chrome/renderer/search_extension.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/chrome/renderer/search_extension.cc b/chrome/renderer/search_extension.cc
index 1a3f543..1ce6296 100644
--- a/chrome/renderer/search_extension.cc
+++ b/chrome/renderer/search_extension.cc
@@ -75,13 +75,10 @@ v8::Handle<v8::Value> SearchExtensionWrapper::SetSuggestResult(
const v8::Arguments& args) {
if (!args.Length() || !args[0]->IsString()) return v8::Undefined();
- std::string suggest = std::string(*v8::String::Utf8Value(args[0]));
- if (!suggest.length()) return v8::Undefined();
-
RenderView* render_view = GetRenderView();
if (!render_view) return v8::Undefined();
- render_view->SetSuggestResult(suggest);
+ render_view->SetSuggestResult(std::string(*v8::String::Utf8Value(args[0])));
return v8::Undefined();
}