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

Unified Diff: chrome/renderer/searchbox_extension.cc

Issue 7779012: renderer: Fix referencing v8::Array and v8::Object using raw pointer. (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 8a2c50210340e31b9a81bd538eb1af24f77b0e0d..42641d1f95e0bb3eaf69f42c1ea6fdeffd0d2416 100644
--- a/chrome/renderer/searchbox_extension.cc
+++ b/chrome/renderer/searchbox_extension.cc
@@ -293,7 +293,8 @@ 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 = v8::Array::Cast(*args[0]);
+ v8::Local<v8::Array> suggestions_array =
+ v8::Local<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(
@@ -303,7 +304,8 @@ v8::Handle<v8::Value> SearchBoxExtensionWrapper::SetSuggestions(
}
} else if (args.Length() && args[0]->IsObject()) {
// Standard version, object argument.
- v8::Object* suggestion_json = static_cast<v8::Object*>(*args[0]);
+ v8::Local<v8::Object> suggestion_json =
+ v8::Local<v8::Object>::Cast(args[0]);
v8::Local<v8::Value> suggestions_field =
suggestion_json->Get(v8::String::New("suggestions"));
« 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