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

Issue 7715031: renderer: Use v8::Array::Cast to cast the return value of Arguments. (Closed)

Created:
9 years, 4 months ago by tfarina
Modified:
9 years, 4 months ago
Reviewers:
tonyg
CC:
chromium-reviews, Aaron Boodman, Erik does not do reviews, darin-cc_chromium.org, mihaip+watch_chromium.org, brettw-cc_chromium.org
Visibility:
Public.

Description

renderer: Use v8::Array::Cast to cast the return value of Arguments. BUG=None TEST=None R=tonyg@chromium.org Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=98220

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -1 line) Patch
M chrome/renderer/searchbox_extension.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 2 (0 generated)
tfarina
9 years, 4 months ago (2011-08-24 15:59:59 UTC) #1
tonyg
9 years, 4 months ago (2011-08-24 16:39:23 UTC) #2
LGTM

On Wed, Aug 24, 2011 at 4:59 PM,  <tfarina@chromium.org> wrote:
> Reviewers: tonyg,
>
> Description:
> renderer: Use v8::Array::Cast to cast the return value of Arguments.
>
> BUG=None
> TEST=None
>
> R=tonyg@chromium.org
>
>
> Please review this at http://codereview.chromium.org/7715031/
>
> SVN Base: svn://svn.chromium.org/chrome/trunk/src
>
> Affected files:
>  M chrome/renderer/searchbox_extension.cc
>
>
> 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(
>
>
>

Powered by Google App Engine
This is Rietveld 408576698