Commit 1ee03c4c authored by vmpstr's avatar vmpstr Committed by Commit bot

gin: Change auto to not deduce raw pointers.

This patch updates the code to prevent auto deducing to a raw pointer.

R=jochen, danakj, dcheng
BUG=554600

Review-Url: https://codereview.chromium.org/2107953002
Cr-Commit-Position: refs/heads/master@{#403300}
parent 8b9d5174
...@@ -112,7 +112,8 @@ void V8IsolateMemoryDumpProvider::DumpHeapStatistics( ...@@ -112,7 +112,8 @@ void V8IsolateMemoryDumpProvider::DumpHeapStatistics(
std::string space_dump_name = std::string space_dump_name =
space_name_prefix + "/" + space_statistics.space_name(); space_name_prefix + "/" + space_statistics.space_name();
auto space_dump = process_memory_dump->CreateAllocatorDump(space_dump_name); auto* space_dump =
process_memory_dump->CreateAllocatorDump(space_dump_name);
space_dump->AddScalar(base::trace_event::MemoryAllocatorDump::kNameSize, space_dump->AddScalar(base::trace_event::MemoryAllocatorDump::kNameSize,
base::trace_event::MemoryAllocatorDump::kUnitsBytes, base::trace_event::MemoryAllocatorDump::kUnitsBytes,
space_physical_size); space_physical_size);
...@@ -128,7 +129,8 @@ void V8IsolateMemoryDumpProvider::DumpHeapStatistics( ...@@ -128,7 +129,8 @@ void V8IsolateMemoryDumpProvider::DumpHeapStatistics(
// Compute the rest of the memory, not accounted by the spaces above. // Compute the rest of the memory, not accounted by the spaces above.
std::string other_spaces_name = space_name_prefix + "/other_spaces"; std::string other_spaces_name = space_name_prefix + "/other_spaces";
auto other_dump = process_memory_dump->CreateAllocatorDump(other_spaces_name); auto* other_dump =
process_memory_dump->CreateAllocatorDump(other_spaces_name);
other_dump->AddScalar( other_dump->AddScalar(
base::trace_event::MemoryAllocatorDump::kNameSize, base::trace_event::MemoryAllocatorDump::kNameSize,
...@@ -148,7 +150,7 @@ void V8IsolateMemoryDumpProvider::DumpHeapStatistics( ...@@ -148,7 +150,7 @@ void V8IsolateMemoryDumpProvider::DumpHeapStatistics(
// so we add an extra dump to avoid mismatches w.r.t. the total // so we add an extra dump to avoid mismatches w.r.t. the total
// resident values. // resident values.
if (heap_statistics.does_zap_garbage()) { if (heap_statistics.does_zap_garbage()) {
auto zap_dump = process_memory_dump->CreateAllocatorDump( auto* zap_dump = process_memory_dump->CreateAllocatorDump(
dump_base_name + "/zapped_for_debug"); dump_base_name + "/zapped_for_debug");
zap_dump->AddScalar(base::trace_event::MemoryAllocatorDump::kNameSize, zap_dump->AddScalar(base::trace_event::MemoryAllocatorDump::kNameSize,
base::trace_event::MemoryAllocatorDump::kUnitsBytes, base::trace_event::MemoryAllocatorDump::kUnitsBytes,
...@@ -158,7 +160,7 @@ void V8IsolateMemoryDumpProvider::DumpHeapStatistics( ...@@ -158,7 +160,7 @@ void V8IsolateMemoryDumpProvider::DumpHeapStatistics(
// Dump statistics about malloced memory. // Dump statistics about malloced memory.
std::string malloc_name = dump_base_name + "/malloc"; std::string malloc_name = dump_base_name + "/malloc";
auto malloc_dump = process_memory_dump->CreateAllocatorDump(malloc_name); auto* malloc_dump = process_memory_dump->CreateAllocatorDump(malloc_name);
malloc_dump->AddScalar(base::trace_event::MemoryAllocatorDump::kNameSize, malloc_dump->AddScalar(base::trace_event::MemoryAllocatorDump::kNameSize,
base::trace_event::MemoryAllocatorDump::kUnitsBytes, base::trace_event::MemoryAllocatorDump::kUnitsBytes,
heap_statistics.malloced_memory()); heap_statistics.malloced_memory());
...@@ -172,7 +174,7 @@ void V8IsolateMemoryDumpProvider::DumpHeapStatistics( ...@@ -172,7 +174,7 @@ void V8IsolateMemoryDumpProvider::DumpHeapStatistics(
// Add an empty row for the heap_spaces. This is to keep the shape of the // Add an empty row for the heap_spaces. This is to keep the shape of the
// dump stable, whether code stats are enabled or not. // dump stable, whether code stats are enabled or not.
auto heap_spaces_dump = auto* heap_spaces_dump =
process_memory_dump->CreateAllocatorDump(space_name_prefix); process_memory_dump->CreateAllocatorDump(space_name_prefix);
// Dump object statistics only for detailed dumps. // Dump object statistics only for detailed dumps.
...@@ -198,7 +200,7 @@ void V8IsolateMemoryDumpProvider::DumpHeapStatistics( ...@@ -198,7 +200,7 @@ void V8IsolateMemoryDumpProvider::DumpHeapStatistics(
object_name_prefix + "/" + object_statistics.object_type(); object_name_prefix + "/" + object_statistics.object_type();
if (object_statistics.object_sub_type()[0] != '\0') if (object_statistics.object_sub_type()[0] != '\0')
dump_name += std::string("/") + object_statistics.object_sub_type(); dump_name += std::string("/") + object_statistics.object_sub_type();
auto object_dump = process_memory_dump->CreateAllocatorDump(dump_name); auto* object_dump = process_memory_dump->CreateAllocatorDump(dump_name);
object_dump->AddScalar( object_dump->AddScalar(
base::trace_event::MemoryAllocatorDump::kNameObjectCount, base::trace_event::MemoryAllocatorDump::kNameObjectCount,
...@@ -212,9 +214,9 @@ void V8IsolateMemoryDumpProvider::DumpHeapStatistics( ...@@ -212,9 +214,9 @@ void V8IsolateMemoryDumpProvider::DumpHeapStatistics(
if (process_memory_dump->GetAllocatorDump(object_name_prefix + if (process_memory_dump->GetAllocatorDump(object_name_prefix +
"/CODE_TYPE")) { "/CODE_TYPE")) {
auto code_kind_dump = process_memory_dump->CreateAllocatorDump( auto* code_kind_dump = process_memory_dump->CreateAllocatorDump(
object_name_prefix + "/CODE_TYPE/CODE_KIND"); object_name_prefix + "/CODE_TYPE/CODE_KIND");
auto code_age_dump = process_memory_dump->CreateAllocatorDump( auto* code_age_dump = process_memory_dump->CreateAllocatorDump(
object_name_prefix + "/CODE_TYPE/CODE_AGE"); object_name_prefix + "/CODE_TYPE/CODE_AGE");
process_memory_dump->AddOwnershipEdge(code_kind_dump->guid(), process_memory_dump->AddOwnershipEdge(code_kind_dump->guid(),
code_age_dump->guid()); code_age_dump->guid());
......
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