commit | 729dc895768a8064dc04d42171c09402a9816f09 | [log] [tgz] |
---|---|---|
author | Benjamin Prosnitz <bprosnitz@google.com> | Fri Apr 03 23:29:44 2020 +0000 |
committer | CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org> | Fri Apr 03 23:29:44 2020 +0000 |
tree | ad7369ec4ef8686ce3b1935667f71420b877bbdd | |
parent | d5ae6ed667e5fde5887b9987f0fa1b6a3902a9bc [diff] |
[llcpp] Don't change source value in std::move of VectorView and tracking_ptr tracking_ptr is intended to match the behavior of raw pointers for unowned pointers where possible (and the behavior of unique_ptr for owned pointers). This wasn't the case for std::move. Example: int* x = &something; int* y = std::move(x); After these statements, x == y rather than x == nullptr. The DecodedMessage class (used in ResultOf) has a destructor that walks the object to close handles. The previous behavior of zeroing pointers after std::move prevented this walk from traversing the object and led to handle leaks. This change restores the previous behavior and allows the object to be walked. Fixed: 49226 Test: fx test llcpp_fidl_types_test Test: fx test llcpp_fidl_builder_test Tests originate from fxr/377022 Change-Id: I35b89f575bfef021c1e4ba48fe549c9fd446439f Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/377654 Commit-Queue: Benjamin Prosnitz <bprosnitz@google.com> Reviewed-by: Chris Tam <godtamit@google.com> Reviewed-by: Yifei Teng <yifeit@google.com> Testability-Review: Yifei Teng <yifeit@google.com>
Pink + Purple == Fuchsia (a new operating system)
Fuchsia is a modular, capability-based operating system. Fuchsia runs on modern 64-bit Intel and ARM processors.
Fuchsia is an open source project with a code of conduct that we expect everyone who interacts with the project to respect.
See Getting Started.
See fuchsia.dev.