diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-14 03:49:49 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-14 03:49:49 +0000 |
commit | 5cbd61fb23d9b4d52dbcd931312738c3362fbc94 (patch) | |
tree | 5bc9663e694ce33cf03e5ed9b75c59f8d4da496b /chrome/renderer/search_extension.cc | |
parent | f30d013adc6eda595390183cc778f6814ca68928 (diff) | |
download | chromium_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.cc | 2 |
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(); |