base: Make TraceEvent a movable class.
This is a small cleanup of the TraceEvent class performed which is part of a larget bug allowing cleaning up and reducing the generated machine code for TRACE_EVENTXXX() macro calls (see related bug). A first CL to perform this refactor was submitted as [1], but later reverted because it made some tests fail mysteriously (see http://crbug.com/899813). So the original CL was split into several independent ones. A first CL was submitted as [2], which actually fixed some potential dangling pointer issues that were created from the Initialize() and MoveFrom() methods. This second CL removes this methods by making TraceEvent a proper C++11 movable type, which should prevent (or at least make it more difficult) introducing invalid states for its instances. The goal is to see if this introduces new unexpected test failures (which would indicate that there are still invalid instance states used in the code base). The third CL is [3] and re-introduces the TraceArguments helper class on top of this one. [1] https://chromium-review.googlesource.com/c/chromium/src/+/1318919 [2] https://chromium-review.googlesource.com/c/chromium/src/+/1340308 [3] https://chromium-review.googlesource.com/c/chromium/src/+/1318919 BUG=898794 R=primiano@chromium.org,oysteine@chromium.org,alexilin@chromium.org,chiniforooshan@chromium.org Change-Id: I2b36885e2485d23cca199c48b2bd07d5745b00c5 Reviewed-on: https://chromium-review.googlesource.com/c/1346305 Commit-Queue: David Turner <digit@chromium.org> Reviewed-by:Ehsan Chiniforooshan <chiniforooshan@chromium.org> Reviewed-by:
Alexandr Ilin <alexilin@chromium.org> Reviewed-by:
oysteine <oysteine@chromium.org> Cr-Commit-Position: refs/heads/master@{#611185}
Showing
Please register or sign in to comment