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-14 03:49:49 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-14 03:49:49 +0000
commit5cbd61fb23d9b4d52dbcd931312738c3362fbc94 (patch)
tree5bc9663e694ce33cf03e5ed9b75c59f8d4da496b /chrome/renderer/search_extension.cc
parentf30d013adc6eda595390183cc778f6814ca68928 (diff)
downloadchromium_src-5cbd61fb23d9b4d52dbcd931312738c3362fbc94.zip
chromium_src-5cbd61fb23d9b4d52dbcd931312738c3362fbc94.tar.gz
chromium_src-5cbd61fb23d9b4d52dbcd931312738c3362fbc94.tar.bz2
Makes sure arg to window.chrome.setSuggestResult is a string and
allows through an empty string. BUG=59116 TEST=none Review URL: http://codereview.chromium.org/3782003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62506 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/search_extension.cc')
-rw-r--r--chrome/renderer/search_extension.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/chrome/renderer/search_extension.cc b/chrome/renderer/search_extension.cc
index dd38508..1a3f543 100644
--- a/chrome/renderer/search_extension.cc
+++ b/chrome/renderer/search_extension.cc
@@ -73,7 +73,7 @@ RenderView* SearchExtensionWrapper::GetRenderView() {
// static
v8::Handle<v8::Value> SearchExtensionWrapper::SetSuggestResult(
const v8::Arguments& args) {
- if (!args.Length()) return v8::Undefined();
+ 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();