Commit 968a6a74 authored by Dave Tapuska's avatar Dave Tapuska Committed by Commit Bot

Fix shadowed variables in the content layer.

Shadowed variables can make code harder to read. Don't support them
in the content layer.

BUG=794619

Change-Id: I117ee483681a2788f93f544dee037dee856f7680
Reviewed-on: https://chromium-review.googlesource.com/926566Reviewed-by: default avatarRichard Coles <torne@chromium.org>
Reviewed-by: default avatarBo <boliu@chromium.org>
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/master@{#537859}
parent b79f463a
......@@ -969,9 +969,9 @@ jint WebContentsAccessibilityAndroid::FindElementType(
if (forwards && start_id == g_element_hosting_autofill_popup_unique_id &&
g_autofill_popup_proxy_node) {
g_element_after_element_hosting_autofill_popup_unique_id = element_id;
auto* android_node =
auto* proxy_android_node =
static_cast<BrowserAccessibilityAndroid*>(g_autofill_popup_proxy_node);
return android_node->unique_id();
return proxy_android_node->unique_id();
}
return element_id;
......
......@@ -776,11 +776,11 @@ void FindRequestManager::RemoveFindMatchRectsPendingReply(
true /* forward */,
true /* matches_only */,
false /* wrap */)) {
auto it = match_rects_.frame_rects.find(frame);
if (it == match_rects_.frame_rects.end())
auto frame_it = match_rects_.frame_rects.find(frame);
if (frame_it == match_rects_.frame_rects.end())
continue;
std::vector<gfx::RectF>& frame_rects = it->second.rects;
std::vector<gfx::RectF>& frame_rects = frame_it->second.rects;
aggregate_rects.insert(
aggregate_rects.end(), frame_rects.begin(), frame_rects.end());
}
......
......@@ -89,14 +89,14 @@ v8::Local<v8::Value> GinJavaFunctionInvocationHelper::Invoke(
std::unique_ptr<const GinJavaBridgeValue> gin_value =
GinJavaBridgeValue::FromValue(result.get());
if (gin_value->IsType(GinJavaBridgeValue::TYPE_OBJECT_ID)) {
GinJavaBridgeObject* result = NULL;
GinJavaBridgeObject* object_result = NULL;
GinJavaBridgeDispatcher::ObjectID object_id;
if (gin_value->GetAsObjectID(&object_id)) {
result = dispatcher_->GetObject(object_id);
object_result = dispatcher_->GetObject(object_id);
}
if (result) {
if (object_result) {
gin::Handle<GinJavaBridgeObject> controller =
gin::CreateHandle(args->isolate(), result);
gin::CreateHandle(args->isolate(), object_result);
if (controller.IsEmpty())
return v8::Undefined(args->isolate());
return controller.ToV8();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment