[chromium-style] auto variable type must not deduce to a raw pointer type

This commit is contained in:
Jeremy Apthorp 2018-04-17 15:41:47 -07:00
parent 667c43398c
commit a635f078c6
61 changed files with 189 additions and 188 deletions

View file

@ -95,7 +95,7 @@ class FrameSpellChecker : public content::RenderFrameVisitor {
main_frame_ = nullptr;
}
bool Visit(content::RenderFrame* render_frame) override {
auto view = render_frame->GetRenderView();
auto* view = render_frame->GetRenderView();
if (view->GetMainRenderFrame() == main_frame_ ||
(render_frame->IsMainFrame() && render_frame == main_frame_)) {
render_frame->GetWebFrame()->SetTextCheckClient(spell_check_client_);
@ -173,7 +173,7 @@ v8::Local<v8::Value> WebFrame::RegisterEmbedderCustomElement(
void WebFrame::RegisterElementResizeCallback(
int element_instance_id,
const GuestViewContainer::ResizeCallback& callback) {
auto guest_view_container = GuestViewContainer::FromID(element_instance_id);
auto* guest_view_container = GuestViewContainer::FromID(element_instance_id);
if (guest_view_container)
guest_view_container->RegisterElementResizeCallback(callback);
}

View file

@ -210,7 +210,7 @@ void AutofillAgent::DoFocusChangeComplete() {
if (focused_node_was_last_clicked_ && was_focused_before_now_) {
ShowSuggestionsOptions options;
options.autofill_on_empty_values = true;
auto input_element = ToWebInputElement(&element);
auto* input_element = ToWebInputElement(&element);
if (input_element)
ShowSuggestions(*input_element, options);
}

View file

@ -126,7 +126,7 @@ void AtomRenderFrameObserver::OnDestruct() {
}
void AtomRenderFrameObserver::CreateIsolatedWorldContext() {
auto frame = render_frame_->GetWebFrame();
auto* frame = render_frame_->GetWebFrame();
// This maps to the name shown in the context combo box in the Console tab
// of the dev tools.

View file

@ -60,7 +60,7 @@ v8::Local<v8::Value> GetBinding(v8::Isolate* isolate,
return exports;
}
auto mod = node::get_builtin_module(module_key.c_str());
auto* mod = node::get_builtin_module(module_key.c_str());
if (!mod) {
char errmsg[1024];
@ -84,7 +84,7 @@ base::CommandLine::StringVector GetArgv() {
void InitializeBindings(v8::Local<v8::Object> binding,
v8::Local<v8::Context> context) {
auto isolate = context->GetIsolate();
auto* isolate = context->GetIsolate();
mate::Dictionary b(isolate, binding);
b.SetMethod("get", GetBinding);
b.SetMethod("crash", AtomBindings::Crash);
@ -111,7 +111,7 @@ class AtomSandboxedRenderFrameObserver : public AtomRenderFrameObserver {
if (!frame)
return;
auto isolate = blink::MainThreadIsolate();
auto* isolate = blink::MainThreadIsolate();
v8::HandleScope handle_scope(isolate);
auto context = frame->MainWorldScriptContext();
v8::Context::Scope context_scope(context);
@ -160,7 +160,7 @@ void AtomSandboxedRendererClient::DidCreateScriptContext(
base::FilePath preload_script_path =
command_line->GetSwitchValuePath(switches::kPreloadScript);
auto isolate = context->GetIsolate();
auto* isolate = context->GetIsolate();
v8::HandleScope handle_scope(isolate);
v8::Context::Scope context_scope(context);
// Wrap the bundle into a function that receives the binding object and the
@ -191,7 +191,7 @@ void AtomSandboxedRendererClient::WillReleaseScriptContext(
if (!render_frame->IsMainFrame())
return;
auto isolate = context->GetIsolate();
auto* isolate = context->GetIsolate();
v8::HandleScope handle_scope(isolate);
v8::Context::Scope context_scope(context);
InvokeIpcCallback(context, "onExit", std::vector<v8::Local<v8::Value>>());
@ -201,7 +201,7 @@ void AtomSandboxedRendererClient::InvokeIpcCallback(
v8::Handle<v8::Context> context,
const std::string& callback_name,
std::vector<v8::Handle<v8::Value>> args) {
auto isolate = context->GetIsolate();
auto* isolate = context->GetIsolate();
auto binding_key = mate::ConvertToV8(isolate, kIpcKey)->ToString();
auto private_binding_key = v8::Private::ForApi(isolate, binding_key);
auto global_object = context->Global();