Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6429)

Unified Diff: chrome/renderer/searchbox_extension.cc

Issue 7715031: renderer: Use v8::Array::Cast to cast the return value of Arguments. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/searchbox_extension.cc
diff --git a/chrome/renderer/searchbox_extension.cc b/chrome/renderer/searchbox_extension.cc
index f1f4f216b120d0c41c39603f6391895fa18fdd87..8a2c50210340e31b9a81bd538eb1af24f77b0e0d 100644
--- a/chrome/renderer/searchbox_extension.cc
+++ b/chrome/renderer/searchbox_extension.cc
@@ -293,7 +293,7 @@ v8::Handle<v8::Value> SearchBoxExtensionWrapper::SetSuggestions(
if (args.Length() && args[0]->IsArray()) {
// For backwards compatibility, also accept an array of strings.
// TODO(tonyg): Remove this when it is confirmed to be unused.
- v8::Array* suggestions_array = static_cast<v8::Array*>(*args[0]);
+ v8::Array* suggestions_array = v8::Array::Cast(*args[0]);
uint32_t length = suggestions_array->Length();
for (uint32_t i = 0; i < length; i++) {
std::string suggestion = *v8::String::Utf8Value(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698