[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
1 file changed
tree: 4dcce1da693f1694e3b2d7b72208f891bcf70883
  1. git-hooks/
  2. infra/
  3. third_party/
  4. cts
  5. firmware
  6. flower
  7. jiri.lock
  8. minimal
  9. prebuilts
  10. README.md
  11. stem
  12. test_durations
  13. toolchain
README.md

Integration

This repository contains Fuchsia's Global Integration manifest files.

Making changes

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.

Obtaining the source

First install Jiri.

Next run:

$ jiri init
$ jiri import minimal https://fuchsia.googlesource.com/integration
$ jiri update

Third party

Third party projects should have their own subdirectory in ./third_party.