base: Make TraceEvent a movable class.
This is a re-land of [1] that has been fixed to not trigger the Clang crash when coverage instrumentation is enabled. [1] https://chromium-review.googlesource.com/c/chromium/src/+/1346305 ---------------- original commit message ---------------------- 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 ------------------ end of original commit message ------------ BUG=898794 R=primiano@chromium.org,oysteine@chromium.org,alexilin@chromium.org,chiniforooshan@chromium.org Change-Id: Icb332f91dd9724a2acae9cb1f99a580541e6cc42 Reviewed-on: https://chromium-review.googlesource.com/c/1353929Reviewed-by:Ehsan Chiniforooshan <chiniforooshan@chromium.org> Commit-Queue: David Turner <digit@chromium.org> Cr-Commit-Position: refs/heads/master@{#611817}
Showing
Please register or sign in to comment