[roll] Roll fuchsia [bt][common] Add WeakSelf replacing WeakPtrFactory
Introduce the WeakSelf template, which replaces use of
fxl::WeakPtrFactory patterns. Usage:
class A: WeakSelf<A> {
A() : WeakSelf(this) {}
void func() {
auto cb = [weak = GetWeakPtr()]() {
if (weak.is_alive()) {
weak->InteractWith();
}
}
// cb can be moved to the async loop, assigned as a callback, etc.
}
}
Original-Bug: BT-2243
Original-Bug: 2766
Original-Bug: 894
Test: Added unit tests; fx test bt-host-common-tests
Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/305790
Original-Revision: f97bab47de9f96ac815a2256092d16cc91d56b34
GitOrigin-RevId: 5432c02e49605206612f95707b6e852a07d1997d
Change-Id: I0a63cecd369a6667711cbca540daffd176725b30
This repository contains Fuchsia's Global Integration manifest files.
All changes should be made to the internal version of this repository. Our infrastructure automatically updates this version when the internal one changes.
Currently all changes must be made by a Google employee. Non-Google employees wishing to make a change can ask for assistance via the IRC channel #fuchsia on Freenode.
First install Jiri.
Next run:
$ jiri init $ jiri import minimal https://fuchsia.googlesource.com/integration $ jiri update
Third party projects should have their own subdirectory in ./third_party.