commit | 2a70d8f6e5c4d87d23629423e01543b386467f92 | [log] [tgz] |
---|---|---|
author | Wyatt Hepler <hepler@google.com> | Thu Sep 02 10:55:44 2021 -0700 |
committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | Tue Sep 07 23:04:45 2021 +0000 |
tree | bdbe3883f7650c205a282dd3fb4454b7bcbd3cc0 | |
parent | 79ea2cf5dd7a766efbfb2c8d9f1019aa983e79e8 [diff] |
pw_rpc: Fix destructor ordering problem in test helpers During destruction, the FakeChannelOutput& in the InvocationContext base class would be used to send a final RPC message. The ChannelOutput instance it pointed to was in a derived class, so would be destructed before the RPC packet was sent, resulting in "pure virtual function call" crashes in tests. - Move the FakeChannelOutput instance to the base InvocationContext so it is destructed last, after any responses are sent. - Explicitly delete some copies/moves. - Fix typo in transfer_test.cc. - Handle some ignored Status returns. Change-Id: I1439dc9af59070507c5dbedab58211f2d165c35d Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/59761 Reviewed-by: Carlos Chinchilla <cachinchilla@google.com> Reviewed-by: Keir Mierle <keir@google.com> Commit-Queue: Wyatt Hepler <hepler@google.com> Pigweed-Auto-Submit: Wyatt Hepler <hepler@google.com>
See our website: http://pigweed.dev