New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 735849 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

Fix order of (success,guid) in memory-infra APIs

Project Member Reported by primiano@chromium.org, Jun 22 2017

Issue description

Just realized that there is a bit of chaos (I might have inadvertently been the major contributor, but realized too late) right now as:

The C++ API have:
RequestGlobalDumpAndAppendToTraceCallback in memory_instrumentation.h has (bool success, uint64_t dump_id)

The mojo API instead have:
memory_instrumentation.mojom
RequestGlobalMemoryDump(RequestArgs args) =>    (uint64 dump_guid, bool success,...)
and
RequestProcessMemoryDump(RequestArgs args) =>   (uint64 dump_guid, bool success, ...)

IMHO we should just switch them to be bool (success, uint64 dump_guid). This can lead to very subtle bugs as there are sitution where base::Bind will happily bind the callback even if the arguments are swapped because of integer promotion.

Will get to this soon, but filing a bug in case I forget to do this.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jun 28 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1181285cddb48eae1dba02a7c8218735749385a4

commit 1181285cddb48eae1dba02a7c8218735749385a4
Author: Primiano Tucci <primiano@chromium.org>
Date: Wed Jun 28 12:30:28 2017

memory-infra: clean up order of callback arguments

Minor non-functional cleanup. Just makes the order of
memory-infra API consistent.
Also this CL removes some unused old-style IPC messages
that we forgot to cleanup as part of the mojoification.

BUG= 735849 
TBR=asvitkine,xunjieli

Change-Id: Ibca6e8153ab33f19fdc415e8cad211a49252e1d2
Reviewed-on: https://chromium-review.googlesource.com/544976
Reviewed-by: Hector Dearman <hjd@chromium.org>
Reviewed-by: Helen Li <xunjieli@chromium.org>
Reviewed-by: Alexei Svitkine <asvitkine@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Primiano Tucci <primiano@chromium.org>
Cr-Commit-Position: refs/heads/master@{#482957}
[modify] https://crrev.com/1181285cddb48eae1dba02a7c8218735749385a4/base/trace_event/memory_dump_manager.cc
[modify] https://crrev.com/1181285cddb48eae1dba02a7c8218735749385a4/base/trace_event/memory_dump_manager_unittest.cc
[modify] https://crrev.com/1181285cddb48eae1dba02a7c8218735749385a4/base/trace_event/memory_dump_request_args.h
[modify] https://crrev.com/1181285cddb48eae1dba02a7c8218735749385a4/chrome/browser/metrics/process_memory_metrics_emitter.cc
[modify] https://crrev.com/1181285cddb48eae1dba02a7c8218735749385a4/chrome/browser/metrics/process_memory_metrics_emitter.h
[modify] https://crrev.com/1181285cddb48eae1dba02a7c8218735749385a4/chrome/browser/metrics/process_memory_metrics_emitter_browsertest.cc
[modify] https://crrev.com/1181285cddb48eae1dba02a7c8218735749385a4/components/tracing/common/tracing_messages.h
[modify] https://crrev.com/1181285cddb48eae1dba02a7c8218735749385a4/net/url_request/url_request_quic_perftest.cc
[modify] https://crrev.com/1181285cddb48eae1dba02a7c8218735749385a4/services/resource_coordinator/memory_instrumentation/coordinator_impl.cc
[modify] https://crrev.com/1181285cddb48eae1dba02a7c8218735749385a4/services/resource_coordinator/memory_instrumentation/coordinator_impl.h
[modify] https://crrev.com/1181285cddb48eae1dba02a7c8218735749385a4/services/resource_coordinator/memory_instrumentation/coordinator_impl_unittest.cc
[modify] https://crrev.com/1181285cddb48eae1dba02a7c8218735749385a4/services/resource_coordinator/public/cpp/memory_instrumentation/client_process_impl.cc
[modify] https://crrev.com/1181285cddb48eae1dba02a7c8218735749385a4/services/resource_coordinator/public/cpp/memory_instrumentation/client_process_impl.h
[modify] https://crrev.com/1181285cddb48eae1dba02a7c8218735749385a4/services/resource_coordinator/public/cpp/memory_instrumentation/memory_instrumentation.cc
[modify] https://crrev.com/1181285cddb48eae1dba02a7c8218735749385a4/services/resource_coordinator/public/interfaces/memory_instrumentation/memory_instrumentation.mojom

Status: Fixed (was: Untriaged)

Sign in to add a comment